Mercurial > hg > truffle
diff src/share/vm/memory/metaspace.hpp @ 7446:e51c9860cf66
8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
Reviewed-by: johnc, coleenp
author | jmasa |
---|---|
date | Mon, 03 Dec 2012 15:09:39 -0800 |
parents | c71879335291 |
children | dbd5837b342f |
line wrap: on
line diff
--- a/src/share/vm/memory/metaspace.hpp Fri Dec 21 10:27:49 2012 -0800 +++ b/src/share/vm/memory/metaspace.hpp Mon Dec 03 15:09:39 2012 -0800 @@ -87,11 +87,23 @@ public: enum MetadataType {ClassType, NonClassType}; + enum MetaspaceType { + StandardMetaspaceType, + BootMetaspaceType, + ROMetaspaceType, + ReadWriteMetaspaceType, + AnonymousMetaspaceType, + ReflectionMetaspaceType + }; private: - void initialize(Mutex* lock, size_t initial_size = 0); + void initialize(Mutex* lock, MetaspaceType type); + + // Align up the word size to the allocation word size + static size_t align_word_size_up(size_t); static size_t _first_chunk_word_size; + static size_t _first_class_chunk_word_size; SpaceManager* _vsm; SpaceManager* vsm() const { return _vsm; } @@ -110,8 +122,7 @@ public: - Metaspace(Mutex* lock, size_t initial_size); - Metaspace(Mutex* lock); + Metaspace(Mutex* lock, MetaspaceType type); ~Metaspace(); // Initialize globals for Metaspace @@ -119,6 +130,7 @@ static void initialize_class_space(ReservedSpace rs); static size_t first_chunk_word_size() { return _first_chunk_word_size; } + static size_t first_class_chunk_word_size() { return _first_class_chunk_word_size; } char* bottom() const; size_t used_words(MetadataType mdtype) const;