Wed, 26 Jun 2013 16:58:37 +0200
8013590: NPG: Add a memory pool MXBean for Metaspace
Reviewed-by: jmasa, mgerdin
coleenp@4037 | 1 | /* |
iklam@5208 | 2 | * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
coleenp@4037 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
coleenp@4037 | 4 | * |
coleenp@4037 | 5 | * This code is free software; you can redistribute it and/or modify it |
coleenp@4037 | 6 | * under the terms of the GNU General Public License version 2 only, as |
coleenp@4037 | 7 | * published by the Free Software Foundation. |
coleenp@4037 | 8 | * |
coleenp@4037 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
coleenp@4037 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
coleenp@4037 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
coleenp@4037 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
coleenp@4037 | 13 | * accompanied this code). |
coleenp@4037 | 14 | * |
coleenp@4037 | 15 | * You should have received a copy of the GNU General Public License version |
coleenp@4037 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
coleenp@4037 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
coleenp@4037 | 18 | * |
coleenp@4037 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
coleenp@4037 | 20 | * or visit www.oracle.com if you need additional information or have any |
coleenp@4037 | 21 | * questions. |
coleenp@4037 | 22 | * |
coleenp@4037 | 23 | */ |
coleenp@4037 | 24 | #ifndef SHARE_VM_MEMORY_METASPACE_HPP |
coleenp@4037 | 25 | #define SHARE_VM_MEMORY_METASPACE_HPP |
coleenp@4037 | 26 | |
coleenp@4037 | 27 | #include "memory/allocation.hpp" |
coleenp@4037 | 28 | #include "memory/memRegion.hpp" |
coleenp@4037 | 29 | #include "runtime/virtualspace.hpp" |
coleenp@4037 | 30 | #include "utilities/exceptions.hpp" |
coleenp@4037 | 31 | |
coleenp@4037 | 32 | // Metaspace |
coleenp@4037 | 33 | // |
coleenp@4037 | 34 | // Metaspaces are Arenas for the VM's metadata. |
coleenp@4037 | 35 | // They are allocated one per class loader object, and one for the null |
coleenp@4037 | 36 | // bootstrap class loader |
coleenp@4037 | 37 | // Eventually for bootstrap loader we'll have a read-only section and read-write |
coleenp@4037 | 38 | // to write for DumpSharedSpaces and read for UseSharedSpaces |
coleenp@4037 | 39 | // |
coleenp@4037 | 40 | // block X ---+ +-------------------+ |
coleenp@4037 | 41 | // | | Virtualspace | |
coleenp@4037 | 42 | // | | | |
coleenp@4037 | 43 | // | | | |
coleenp@4037 | 44 | // | |-------------------| |
coleenp@4037 | 45 | // | || Chunk | |
coleenp@4037 | 46 | // | || | |
coleenp@4037 | 47 | // | ||---------- | |
coleenp@4037 | 48 | // +------>||| block 0 | | |
coleenp@4037 | 49 | // ||---------- | |
coleenp@4037 | 50 | // ||| block 1 | | |
coleenp@4037 | 51 | // ||---------- | |
coleenp@4037 | 52 | // || | |
coleenp@4037 | 53 | // |-------------------| |
coleenp@4037 | 54 | // | | |
coleenp@4037 | 55 | // | | |
coleenp@4037 | 56 | // +-------------------+ |
coleenp@4037 | 57 | // |
coleenp@4037 | 58 | |
coleenp@4037 | 59 | class ClassLoaderData; |
jmasa@4196 | 60 | class Metablock; |
coleenp@4037 | 61 | class MetaWord; |
coleenp@4037 | 62 | class Mutex; |
coleenp@4037 | 63 | class outputStream; |
coleenp@4037 | 64 | class SpaceManager; |
coleenp@4037 | 65 | |
coleenp@4037 | 66 | // Metaspaces each have a SpaceManager and allocations |
coleenp@4037 | 67 | // are done by the SpaceManager. Allocations are done |
coleenp@4037 | 68 | // out of the current Metachunk. When the current Metachunk |
coleenp@4037 | 69 | // is exhausted, the SpaceManager gets a new one from |
coleenp@4037 | 70 | // the current VirtualSpace. When the VirtualSpace is exhausted |
coleenp@4037 | 71 | // the SpaceManager gets a new one. The SpaceManager |
coleenp@4037 | 72 | // also manages freelists of available Chunks. |
coleenp@4037 | 73 | // |
coleenp@4037 | 74 | // Currently the space manager maintains the list of |
coleenp@4037 | 75 | // virtual spaces and the list of chunks in use. Its |
coleenp@4037 | 76 | // allocate() method returns a block for use as a |
coleenp@4037 | 77 | // quantum of metadata. |
coleenp@4037 | 78 | |
coleenp@4037 | 79 | class VirtualSpaceList; |
coleenp@4037 | 80 | |
coleenp@4037 | 81 | class Metaspace : public CHeapObj<mtClass> { |
coleenp@4037 | 82 | friend class VMStructs; |
coleenp@4037 | 83 | friend class SpaceManager; |
coleenp@4037 | 84 | friend class VM_CollectForMetadataAllocation; |
coleenp@4037 | 85 | friend class MetaspaceGC; |
coleenp@4037 | 86 | friend class MetaspaceAux; |
coleenp@4037 | 87 | |
coleenp@4037 | 88 | public: |
jmasa@5162 | 89 | enum MetadataType {ClassType = 0, |
jmasa@5162 | 90 | NonClassType = ClassType + 1, |
jmasa@5162 | 91 | MetadataTypeCount = ClassType + 2 |
jmasa@5162 | 92 | }; |
jmasa@4382 | 93 | enum MetaspaceType { |
jmasa@4382 | 94 | StandardMetaspaceType, |
jmasa@4382 | 95 | BootMetaspaceType, |
jmasa@4382 | 96 | ROMetaspaceType, |
jmasa@4382 | 97 | ReadWriteMetaspaceType, |
jmasa@4382 | 98 | AnonymousMetaspaceType, |
jmasa@4382 | 99 | ReflectionMetaspaceType |
jmasa@4382 | 100 | }; |
coleenp@4037 | 101 | |
coleenp@4037 | 102 | private: |
jmasa@4382 | 103 | void initialize(Mutex* lock, MetaspaceType type); |
jmasa@4382 | 104 | |
jmasa@4382 | 105 | // Align up the word size to the allocation word size |
jmasa@4382 | 106 | static size_t align_word_size_up(size_t); |
coleenp@4037 | 107 | |
coleenp@4037 | 108 | static size_t _first_chunk_word_size; |
jmasa@4382 | 109 | static size_t _first_class_chunk_word_size; |
coleenp@4037 | 110 | |
coleenp@4037 | 111 | SpaceManager* _vsm; |
coleenp@4037 | 112 | SpaceManager* vsm() const { return _vsm; } |
coleenp@4037 | 113 | |
coleenp@4037 | 114 | SpaceManager* _class_vsm; |
coleenp@4037 | 115 | SpaceManager* class_vsm() const { return _class_vsm; } |
coleenp@4037 | 116 | |
jmasa@5015 | 117 | // Allocate space for metadata of type mdtype. This is space |
jmasa@5015 | 118 | // within a Metachunk and is used by |
jmasa@5015 | 119 | // allocate(ClassLoaderData*, size_t, bool, MetadataType, TRAPS) |
jmasa@5015 | 120 | // which returns a Metablock. |
coleenp@4037 | 121 | MetaWord* allocate(size_t word_size, MetadataType mdtype); |
coleenp@4037 | 122 | |
coleenp@4037 | 123 | // Virtual Space lists for both classes and other metadata |
coleenp@4037 | 124 | static VirtualSpaceList* _space_list; |
coleenp@4037 | 125 | static VirtualSpaceList* _class_space_list; |
coleenp@4037 | 126 | |
coleenp@4037 | 127 | static VirtualSpaceList* space_list() { return _space_list; } |
coleenp@4037 | 128 | static VirtualSpaceList* class_space_list() { return _class_space_list; } |
coleenp@4037 | 129 | |
iklam@5208 | 130 | // This is used by DumpSharedSpaces only, where only _vsm is used. So we will |
iklam@5208 | 131 | // maintain a single list for now. |
iklam@5208 | 132 | void record_allocation(void* ptr, MetaspaceObj::Type type, size_t word_size); |
iklam@5208 | 133 | |
iklam@5208 | 134 | class AllocRecord : public CHeapObj<mtClass> { |
iklam@5208 | 135 | public: |
iklam@5208 | 136 | AllocRecord(address ptr, MetaspaceObj::Type type, int byte_size) |
iklam@5208 | 137 | : _next(NULL), _ptr(ptr), _type(type), _byte_size(byte_size) {} |
iklam@5208 | 138 | AllocRecord *_next; |
iklam@5208 | 139 | address _ptr; |
iklam@5208 | 140 | MetaspaceObj::Type _type; |
iklam@5208 | 141 | int _byte_size; |
iklam@5208 | 142 | }; |
iklam@5208 | 143 | |
iklam@5208 | 144 | AllocRecord * _alloc_record_head; |
iklam@5208 | 145 | AllocRecord * _alloc_record_tail; |
iklam@5208 | 146 | |
coleenp@4037 | 147 | public: |
coleenp@4037 | 148 | |
jmasa@4382 | 149 | Metaspace(Mutex* lock, MetaspaceType type); |
coleenp@4037 | 150 | ~Metaspace(); |
coleenp@4037 | 151 | |
coleenp@4037 | 152 | // Initialize globals for Metaspace |
coleenp@4037 | 153 | static void global_initialize(); |
coleenp@4037 | 154 | static void initialize_class_space(ReservedSpace rs); |
coleenp@4037 | 155 | |
coleenp@4037 | 156 | static size_t first_chunk_word_size() { return _first_chunk_word_size; } |
jmasa@4382 | 157 | static size_t first_class_chunk_word_size() { return _first_class_chunk_word_size; } |
coleenp@4037 | 158 | |
coleenp@4037 | 159 | char* bottom() const; |
jmasa@5015 | 160 | size_t used_words_slow(MetadataType mdtype) const; |
coleenp@4037 | 161 | size_t free_words(MetadataType mdtype) const; |
jmasa@5015 | 162 | size_t capacity_words_slow(MetadataType mdtype) const; |
coleenp@4037 | 163 | size_t waste_words(MetadataType mdtype) const; |
coleenp@4037 | 164 | |
jmasa@5015 | 165 | size_t used_bytes_slow(MetadataType mdtype) const; |
jmasa@5015 | 166 | size_t capacity_bytes_slow(MetadataType mdtype) const; |
jmasa@5015 | 167 | |
iklam@5208 | 168 | static Metablock* allocate(ClassLoaderData* loader_data, size_t word_size, |
iklam@5208 | 169 | bool read_only, MetaspaceObj::Type type, TRAPS); |
jmasa@4064 | 170 | void deallocate(MetaWord* ptr, size_t byte_size, bool is_class); |
coleenp@4037 | 171 | |
jmasa@4064 | 172 | MetaWord* expand_and_allocate(size_t size, |
jmasa@4064 | 173 | MetadataType mdtype); |
coleenp@4037 | 174 | |
roland@4159 | 175 | static bool is_initialized() { return _class_space_list != NULL; } |
roland@4159 | 176 | |
coleenp@4295 | 177 | static bool contains(const void *ptr); |
coleenp@4037 | 178 | void dump(outputStream* const out) const; |
coleenp@4037 | 179 | |
jmasa@5007 | 180 | // Free empty virtualspaces |
jmasa@5007 | 181 | static void purge(); |
jmasa@5007 | 182 | |
coleenp@4037 | 183 | void print_on(outputStream* st) const; |
coleenp@4037 | 184 | // Debugging support |
coleenp@4037 | 185 | void verify(); |
iklam@5208 | 186 | |
iklam@5208 | 187 | class AllocRecordClosure : public StackObj { |
iklam@5208 | 188 | public: |
iklam@5208 | 189 | virtual void doit(address ptr, MetaspaceObj::Type type, int byte_size) = 0; |
iklam@5208 | 190 | }; |
iklam@5208 | 191 | |
iklam@5208 | 192 | void iterate(AllocRecordClosure *closure); |
coleenp@4037 | 193 | }; |
coleenp@4037 | 194 | |
coleenp@4037 | 195 | class MetaspaceAux : AllStatic { |
sla@5237 | 196 | static size_t free_chunks_total(Metaspace::MetadataType mdtype); |
sla@5237 | 197 | static size_t free_chunks_total_in_bytes(Metaspace::MetadataType mdtype); |
coleenp@4037 | 198 | |
sla@5237 | 199 | public: |
coleenp@4037 | 200 | // Statistics for class space and data space in metaspace. |
jmasa@5015 | 201 | |
jmasa@5015 | 202 | // These methods iterate over the classloader data graph |
jmasa@5015 | 203 | // for the given Metaspace type. These are slow. |
jmasa@5015 | 204 | static size_t used_bytes_slow(Metaspace::MetadataType mdtype); |
coleenp@4037 | 205 | static size_t free_in_bytes(Metaspace::MetadataType mdtype); |
jmasa@5015 | 206 | static size_t capacity_bytes_slow(Metaspace::MetadataType mdtype); |
jmasa@5015 | 207 | |
jmasa@5015 | 208 | // Iterates over the virtual space list. |
coleenp@4037 | 209 | static size_t reserved_in_bytes(Metaspace::MetadataType mdtype); |
coleenp@4037 | 210 | |
jmasa@5015 | 211 | // Running sum of space in all Metachunks that has been |
jmasa@5015 | 212 | // allocated to a Metaspace. This is used instead of |
jmasa@5162 | 213 | // iterating over all the classloaders. One for each |
jmasa@5162 | 214 | // type of Metadata |
jmasa@5162 | 215 | static size_t _allocated_capacity_words[Metaspace:: MetadataTypeCount]; |
jmasa@5015 | 216 | // Running sum of space in all Metachunks that have |
jmasa@5162 | 217 | // are being used for metadata. One for each |
jmasa@5162 | 218 | // type of Metadata. |
jmasa@5162 | 219 | static size_t _allocated_used_words[Metaspace:: MetadataTypeCount]; |
jmasa@5015 | 220 | |
jmasa@5015 | 221 | public: |
jmasa@5015 | 222 | // Decrement and increment _allocated_capacity_words |
jmasa@5162 | 223 | static void dec_capacity(Metaspace::MetadataType type, size_t words); |
jmasa@5162 | 224 | static void inc_capacity(Metaspace::MetadataType type, size_t words); |
jmasa@5015 | 225 | |
jmasa@5015 | 226 | // Decrement and increment _allocated_used_words |
jmasa@5162 | 227 | static void dec_used(Metaspace::MetadataType type, size_t words); |
jmasa@5162 | 228 | static void inc_used(Metaspace::MetadataType type, size_t words); |
jmasa@5015 | 229 | |
jmasa@5015 | 230 | // Total of space allocated to metadata in all Metaspaces. |
jmasa@5015 | 231 | // This sums the space used in each Metachunk by |
jmasa@5015 | 232 | // iterating over the classloader data graph |
jmasa@5015 | 233 | static size_t used_bytes_slow() { |
jmasa@5015 | 234 | return used_bytes_slow(Metaspace::ClassType) + |
jmasa@5015 | 235 | used_bytes_slow(Metaspace::NonClassType); |
stefank@4371 | 236 | } |
coleenp@4037 | 237 | |
jmasa@5015 | 238 | // Used by MetaspaceCounters |
jmasa@5015 | 239 | static size_t free_chunks_total(); |
jmasa@5015 | 240 | static size_t free_chunks_total_in_bytes(); |
jmasa@5015 | 241 | |
jmasa@5162 | 242 | static size_t allocated_capacity_words(Metaspace::MetadataType mdtype) { |
jmasa@5162 | 243 | return _allocated_capacity_words[mdtype]; |
jmasa@5162 | 244 | } |
jmasa@5015 | 245 | static size_t allocated_capacity_words() { |
jmasa@5162 | 246 | return _allocated_capacity_words[Metaspace::ClassType] + |
jmasa@5162 | 247 | _allocated_capacity_words[Metaspace::NonClassType]; |
jmasa@5162 | 248 | } |
jmasa@5162 | 249 | static size_t allocated_capacity_bytes(Metaspace::MetadataType mdtype) { |
jmasa@5162 | 250 | return allocated_capacity_words(mdtype) * BytesPerWord; |
jmasa@5015 | 251 | } |
jmasa@5015 | 252 | static size_t allocated_capacity_bytes() { |
jmasa@5162 | 253 | return allocated_capacity_words() * BytesPerWord; |
jmasa@5015 | 254 | } |
jmasa@5015 | 255 | |
jmasa@5162 | 256 | static size_t allocated_used_words(Metaspace::MetadataType mdtype) { |
jmasa@5162 | 257 | return _allocated_used_words[mdtype]; |
jmasa@5162 | 258 | } |
jmasa@5015 | 259 | static size_t allocated_used_words() { |
jmasa@5162 | 260 | return _allocated_used_words[Metaspace::ClassType] + |
jmasa@5162 | 261 | _allocated_used_words[Metaspace::NonClassType]; |
jmasa@5162 | 262 | } |
jmasa@5162 | 263 | static size_t allocated_used_bytes(Metaspace::MetadataType mdtype) { |
jmasa@5162 | 264 | return allocated_used_words(mdtype) * BytesPerWord; |
jmasa@5015 | 265 | } |
jmasa@5015 | 266 | static size_t allocated_used_bytes() { |
jmasa@5162 | 267 | return allocated_used_words() * BytesPerWord; |
jmasa@5015 | 268 | } |
jmasa@5015 | 269 | |
jmasa@5015 | 270 | static size_t free_bytes(); |
jmasa@5015 | 271 | |
jmasa@5015 | 272 | // Total capacity in all Metaspaces |
jmasa@5015 | 273 | static size_t capacity_bytes_slow() { |
jmasa@5015 | 274 | #ifdef PRODUCT |
jmasa@5015 | 275 | // Use allocated_capacity_bytes() in PRODUCT instead of this function. |
jmasa@5015 | 276 | guarantee(false, "Should not call capacity_bytes_slow() in the PRODUCT"); |
jmasa@5015 | 277 | #endif |
jmasa@5015 | 278 | size_t class_capacity = capacity_bytes_slow(Metaspace::ClassType); |
jmasa@5015 | 279 | size_t non_class_capacity = capacity_bytes_slow(Metaspace::NonClassType); |
jmasa@5015 | 280 | assert(allocated_capacity_bytes() == class_capacity + non_class_capacity, |
jmasa@5015 | 281 | err_msg("bad accounting: allocated_capacity_bytes() " SIZE_FORMAT |
jmasa@5015 | 282 | " class_capacity + non_class_capacity " SIZE_FORMAT |
jmasa@5015 | 283 | " class_capacity " SIZE_FORMAT " non_class_capacity " SIZE_FORMAT, |
jmasa@5015 | 284 | allocated_capacity_bytes(), class_capacity + non_class_capacity, |
jmasa@5015 | 285 | class_capacity, non_class_capacity)); |
jmasa@5015 | 286 | |
jmasa@5015 | 287 | return class_capacity + non_class_capacity; |
stefank@4371 | 288 | } |
coleenp@4037 | 289 | |
coleenp@4037 | 290 | // Total space reserved in all Metaspaces |
stefank@4371 | 291 | static size_t reserved_in_bytes() { |
stefank@4371 | 292 | return reserved_in_bytes(Metaspace::ClassType) + |
stefank@4371 | 293 | reserved_in_bytes(Metaspace::NonClassType); |
stefank@4371 | 294 | } |
coleenp@4037 | 295 | |
coleenp@4037 | 296 | static size_t min_chunk_size(); |
coleenp@4037 | 297 | |
coleenp@4037 | 298 | // Print change in used metadata. |
coleenp@4037 | 299 | static void print_metaspace_change(size_t prev_metadata_used); |
coleenp@4037 | 300 | static void print_on(outputStream * out); |
coleenp@4037 | 301 | static void print_on(outputStream * out, Metaspace::MetadataType mdtype); |
coleenp@4037 | 302 | |
coleenp@4037 | 303 | static void print_waste(outputStream* out); |
coleenp@4037 | 304 | static void dump(outputStream* out); |
mgerdin@4264 | 305 | static void verify_free_chunks(); |
jmasa@5015 | 306 | // Checks that the values returned by allocated_capacity_bytes() and |
jmasa@5015 | 307 | // capacity_bytes_slow() are the same. |
jmasa@5015 | 308 | static void verify_capacity(); |
jmasa@5015 | 309 | static void verify_used(); |
jmasa@5015 | 310 | static void verify_metrics(); |
coleenp@4037 | 311 | }; |
coleenp@4037 | 312 | |
coleenp@4037 | 313 | // Metaspace are deallocated when their class loader are GC'ed. |
coleenp@4037 | 314 | // This class implements a policy for inducing GC's to recover |
coleenp@4037 | 315 | // Metaspaces. |
coleenp@4037 | 316 | |
coleenp@4037 | 317 | class MetaspaceGC : AllStatic { |
coleenp@4037 | 318 | |
coleenp@4037 | 319 | // The current high-water-mark for inducing a GC. When |
coleenp@4037 | 320 | // the capacity of all space in the virtual lists reaches this value, |
coleenp@4037 | 321 | // a GC is induced and the value is increased. This should be changed |
coleenp@4037 | 322 | // to the space actually used for allocations to avoid affects of |
coleenp@4037 | 323 | // fragmentation losses to partially used chunks. Size is in words. |
coleenp@4037 | 324 | static size_t _capacity_until_GC; |
coleenp@4037 | 325 | |
coleenp@4037 | 326 | // After a GC is done any allocation that fails should try to expand |
coleenp@4037 | 327 | // the capacity of the Metaspaces. This flag is set during attempts |
coleenp@4037 | 328 | // to allocate in the VMGCOperation that does the GC. |
coleenp@4037 | 329 | static bool _expand_after_GC; |
coleenp@4037 | 330 | |
coleenp@4037 | 331 | // For a CMS collection, signal that a concurrent collection should |
coleenp@4037 | 332 | // be started. |
coleenp@4037 | 333 | static bool _should_concurrent_collect; |
coleenp@4037 | 334 | |
coleenp@4037 | 335 | static uint _shrink_factor; |
coleenp@4037 | 336 | |
coleenp@4037 | 337 | static void set_capacity_until_GC(size_t v) { _capacity_until_GC = v; } |
coleenp@4037 | 338 | |
coleenp@4037 | 339 | static size_t shrink_factor() { return _shrink_factor; } |
coleenp@4037 | 340 | void set_shrink_factor(uint v) { _shrink_factor = v; } |
coleenp@4037 | 341 | |
coleenp@4037 | 342 | public: |
coleenp@4037 | 343 | |
coleenp@4037 | 344 | static size_t capacity_until_GC() { return _capacity_until_GC; } |
coleenp@4037 | 345 | static void inc_capacity_until_GC(size_t v) { _capacity_until_GC += v; } |
coleenp@4037 | 346 | static void dec_capacity_until_GC(size_t v) { |
coleenp@4037 | 347 | _capacity_until_GC = _capacity_until_GC > v ? _capacity_until_GC - v : 0; |
coleenp@4037 | 348 | } |
coleenp@4037 | 349 | static bool expand_after_GC() { return _expand_after_GC; } |
coleenp@4037 | 350 | static void set_expand_after_GC(bool v) { _expand_after_GC = v; } |
coleenp@4037 | 351 | |
coleenp@4037 | 352 | static bool should_concurrent_collect() { return _should_concurrent_collect; } |
coleenp@4037 | 353 | static void set_should_concurrent_collect(bool v) { |
coleenp@4037 | 354 | _should_concurrent_collect = v; |
coleenp@4037 | 355 | } |
coleenp@4037 | 356 | |
coleenp@4037 | 357 | // The amount to increase the high-water-mark (_capacity_until_GC) |
coleenp@4037 | 358 | static size_t delta_capacity_until_GC(size_t word_size); |
coleenp@4037 | 359 | |
coleenp@4037 | 360 | // It is expected that this will be called when the current capacity |
coleenp@4037 | 361 | // has been used and a GC should be considered. |
coleenp@4037 | 362 | static bool should_expand(VirtualSpaceList* vsl, size_t word_size); |
coleenp@4037 | 363 | |
coleenp@4037 | 364 | // Calculate the new high-water mark at which to induce |
coleenp@4037 | 365 | // a GC. |
coleenp@4037 | 366 | static void compute_new_size(); |
coleenp@4037 | 367 | }; |
coleenp@4037 | 368 | |
coleenp@4037 | 369 | #endif // SHARE_VM_MEMORY_METASPACE_HPP |