src/hotspot/share/memory/metachunk.cpp
author stuefe
Tue, 06 Mar 2018 19:24:13 +0100
changeset 49365 825f006619e5
parent 47808 57752bd5d1b4
child 50066 bd3e4517dfa3
permissions -rw-r--r--
8198423: Improve metaspace chunk allocation Reviewed-by: goetz, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     1
/*
42017
ed85071e7d9d 8166804: Convert TestMetachunk_test to GTest
kzhaldyb
parents: 36829
diff changeset
     2
 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     4
 *
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     7
 * published by the Free Software Foundation.
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     8
 *
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    13
 * accompanied this code).
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    14
 *
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    18
 *
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    21
 * questions.
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    22
 *
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    23
 */
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    24
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    25
#include "precompiled.hpp"
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    26
#include "memory/allocation.hpp"
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    27
#include "memory/metachunk.hpp"
46625
edefffab74e2 8183552: Move align functions to align.hpp
stefank
parents: 46619
diff changeset
    28
#include "utilities/align.hpp"
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    29
#include "utilities/copy.hpp"
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    30
#include "utilities/debug.hpp"
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    31
17101
3a82a58d9aa9 8011268: NPG: Free unused VirtualSpaceNodes
jmasa
parents: 15086
diff changeset
    32
class VirtualSpaceNode;
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    33
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    34
size_t Metachunk::object_alignment() {
20730
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    35
  // Must align pointers and sizes to 8,
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    36
  // so that 64 bit types get correctly aligned.
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    37
  const size_t alignment = 8;
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    38
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    39
  // Make sure that the Klass alignment also agree.
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    40
  STATIC_ASSERT(alignment == (size_t)KlassAlignmentInBytes);
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    41
59f433c86d9d 8026392: Metachunks and Metablocks are using a too large alignment
stefank
parents: 20729
diff changeset
    42
  return alignment;
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    43
}
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    44
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    45
size_t Metachunk::overhead() {
46619
a3919f5e8d2b 8178499: Remove _ptr_ and _size_ infixes from align functions
stefank
parents: 42017
diff changeset
    46
  return align_up(sizeof(Metachunk), object_alignment()) / BytesPerWord;
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    47
}
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    48
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    49
// Metachunk methods
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    50
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    51
Metachunk::Metachunk(ChunkIndex chunktype, bool is_class, size_t word_size,
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    52
                     VirtualSpaceNode* container)
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    53
    : Metabase<Metachunk>(word_size),
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    54
    _chunk_type(chunktype),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    55
    _is_class(is_class),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    56
    _sentinel(CHUNK_SENTINEL),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    57
    _origin(origin_normal),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    58
    _use_count(0),
17101
3a82a58d9aa9 8011268: NPG: Free unused VirtualSpaceNodes
jmasa
parents: 15086
diff changeset
    59
    _top(NULL),
3a82a58d9aa9 8011268: NPG: Free unused VirtualSpaceNodes
jmasa
parents: 15086
diff changeset
    60
    _container(container)
3a82a58d9aa9 8011268: NPG: Free unused VirtualSpaceNodes
jmasa
parents: 15086
diff changeset
    61
{
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    62
  _top = initial_top();
47808
57752bd5d1b4 8189864: Provide an ascii map to visualize metaspace fragmentation
stuefe
parents: 47216
diff changeset
    63
  set_is_tagged_free(false);
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    64
#ifdef ASSERT
36829
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 29800
diff changeset
    65
  mangle(uninitMetaWordVal);
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    66
  verify();
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    67
#endif
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    68
}
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    69
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    70
MetaWord* Metachunk::allocate(size_t word_size) {
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    71
  MetaWord* result = NULL;
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    72
  // If available, bump the pointer to allocate.
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    73
  if (free_word_size() >= word_size) {
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    74
    result = _top;
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    75
    _top = _top + word_size;
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    76
  }
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    77
  return result;
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    78
}
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    79
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    80
// _bottom points to the start of the chunk including the overhead.
15086
2bfd799e9147 8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
jmasa
parents: 14635
diff changeset
    81
size_t Metachunk::used_word_size() const {
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    82
  return pointer_delta(_top, bottom(), sizeof(MetaWord));
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    83
}
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    84
15086
2bfd799e9147 8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
jmasa
parents: 14635
diff changeset
    85
size_t Metachunk::free_word_size() const {
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    86
  return pointer_delta(end(), _top, sizeof(MetaWord));
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    87
}
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    88
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    89
void Metachunk::print_on(outputStream* st) const {
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    90
  st->print_cr("Metachunk:"
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    91
               " bottom " PTR_FORMAT " top " PTR_FORMAT
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    92
               " end " PTR_FORMAT " size " SIZE_FORMAT " (%s)",
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    93
               p2i(bottom()), p2i(_top), p2i(end()), word_size(),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
    94
               chunk_size_name(get_chunk_type()));
15086
2bfd799e9147 8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
jmasa
parents: 14635
diff changeset
    95
  if (Verbose) {
2bfd799e9147 8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
jmasa
parents: 14635
diff changeset
    96
    st->print_cr("    used " SIZE_FORMAT " free " SIZE_FORMAT,
2bfd799e9147 8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
jmasa
parents: 14635
diff changeset
    97
                 used_word_size(), free_word_size());
2bfd799e9147 8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
jmasa
parents: 14635
diff changeset
    98
  }
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
    99
}
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
   100
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   101
#ifdef ASSERT
36829
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 29800
diff changeset
   102
void Metachunk::mangle(juint word_value) {
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 29800
diff changeset
   103
  // Overwrite the payload of the chunk and not the links that
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
   104
  // maintain list of chunks.
36829
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 29800
diff changeset
   105
  HeapWord* start = (HeapWord*)initial_top();
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   106
  size_t size = word_size() - overhead();
36829
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 29800
diff changeset
   107
  Copy::fill_to_words(start, size, word_value);
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
   108
}
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
   109
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
   110
void Metachunk::verify() {
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   111
  assert(is_valid_sentinel(), "Chunk " PTR_FORMAT ": sentinel invalid", p2i(this));
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   112
  const ChunkIndex chunk_type = get_chunk_type();
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   113
  assert(is_valid_chunktype(chunk_type), "Chunk " PTR_FORMAT ": Invalid chunk type.", p2i(this));
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   114
  if (chunk_type != HumongousIndex) {
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   115
    assert(word_size() == get_size_for_nonhumongous_chunktype(chunk_type, is_class()),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   116
           "Chunk " PTR_FORMAT ": wordsize " SIZE_FORMAT " does not fit chunk type %s.",
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   117
           p2i(this), word_size(), chunk_size_name(chunk_type));
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   118
  }
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   119
  assert(is_valid_chunkorigin(get_origin()), "Chunk " PTR_FORMAT ": Invalid chunk origin.", p2i(this));
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   120
  assert(bottom() <= _top && _top <= (MetaWord*)end(),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   121
         "Chunk " PTR_FORMAT ": Chunk top out of chunk bounds.", p2i(this));
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   122
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   123
  // For non-humongous chunks, starting address shall be aligned
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   124
  // to its chunk size. Humongous chunks start address is
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   125
  // aligned to specialized chunk size.
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   126
  const size_t required_alignment =
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   127
    (chunk_type != HumongousIndex ? word_size() : get_size_for_nonhumongous_chunktype(SpecializedIndex, is_class())) * sizeof(MetaWord);
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   128
  assert(is_aligned((address)this, required_alignment),
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   129
         "Chunk " PTR_FORMAT ": (size " SIZE_FORMAT ") not aligned to " SIZE_FORMAT ".",
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   130
         p2i(this), word_size() * sizeof(MetaWord), required_alignment);
14635
6a3c85b8111c 8003554: NPG: move Metablock and Metachunk code out of metaspace.cpp
jmasa
parents:
diff changeset
   131
}
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   132
49365
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   133
#endif // ASSERT
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   134
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   135
// Helper, returns a descriptive name for the given index.
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   136
const char* chunk_size_name(ChunkIndex index) {
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   137
  switch (index) {
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   138
    case SpecializedIndex:
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   139
      return "specialized";
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   140
    case SmallIndex:
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   141
      return "small";
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   142
    case MediumIndex:
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   143
      return "medium";
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   144
    case HumongousIndex:
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   145
      return "humongous";
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   146
    default:
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   147
      return "Invalid index";
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   148
  }
825f006619e5 8198423: Improve metaspace chunk allocation
stuefe
parents: 47808
diff changeset
   149
}