src/share/vm/memory/metaspace.hpp

Print this page
rev 3688 : 7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by:


 118 
 119   // Initialize globals for Metaspace
 120   static void global_initialize();
 121   static void initialize_class_space(ReservedSpace rs);
 122 
 123   static size_t first_chunk_word_size() { return _first_chunk_word_size; }
 124 
 125   char*  bottom() const;
 126   size_t used_words(MetadataType mdtype) const;
 127   size_t free_words(MetadataType mdtype) const;
 128   size_t capacity_words(MetadataType mdtype) const;
 129   size_t waste_words(MetadataType mdtype) const;
 130 
 131   static MetaWord* allocate(ClassLoaderData* loader_data, size_t size,
 132                             bool read_only, MetadataType mdtype, TRAPS);
 133   void deallocate(MetaWord* ptr, size_t byte_size, bool is_class);
 134 
 135   MetaWord* expand_and_allocate(size_t size,
 136                                 MetadataType mdtype);
 137 


 138 #ifndef PRODUCT
 139   bool contains(const void *ptr) const;
 140   bool contains_class(const void *ptr) const;
 141 #endif
 142 
 143   void dump(outputStream* const out) const;
 144 
 145   void print_on(outputStream* st) const;
 146   // Debugging support
 147   void verify();
 148 };
 149 
 150 class MetaspaceAux : AllStatic {
 151 
 152   // Statistics for class space and data space in metaspace.
 153   static size_t used_in_bytes(Metaspace::MetadataType mdtype);
 154   static size_t free_in_bytes(Metaspace::MetadataType mdtype);
 155   static size_t capacity_in_bytes(Metaspace::MetadataType mdtype);
 156   static size_t reserved_in_bytes(Metaspace::MetadataType mdtype);
 157 




 118 
 119   // Initialize globals for Metaspace
 120   static void global_initialize();
 121   static void initialize_class_space(ReservedSpace rs);
 122 
 123   static size_t first_chunk_word_size() { return _first_chunk_word_size; }
 124 
 125   char*  bottom() const;
 126   size_t used_words(MetadataType mdtype) const;
 127   size_t free_words(MetadataType mdtype) const;
 128   size_t capacity_words(MetadataType mdtype) const;
 129   size_t waste_words(MetadataType mdtype) const;
 130 
 131   static MetaWord* allocate(ClassLoaderData* loader_data, size_t size,
 132                             bool read_only, MetadataType mdtype, TRAPS);
 133   void deallocate(MetaWord* ptr, size_t byte_size, bool is_class);
 134 
 135   MetaWord* expand_and_allocate(size_t size,
 136                                 MetadataType mdtype);
 137 
 138   static bool is_initialized() { return _class_space_list != NULL; }
 139 
 140 #ifndef PRODUCT
 141   bool contains(const void *ptr) const;
 142   bool contains_class(const void *ptr) const;
 143 #endif
 144 
 145   void dump(outputStream* const out) const;
 146 
 147   void print_on(outputStream* st) const;
 148   // Debugging support
 149   void verify();
 150 };
 151 
 152 class MetaspaceAux : AllStatic {
 153 
 154   // Statistics for class space and data space in metaspace.
 155   static size_t used_in_bytes(Metaspace::MetadataType mdtype);
 156   static size_t free_in_bytes(Metaspace::MetadataType mdtype);
 157   static size_t capacity_in_bytes(Metaspace::MetadataType mdtype);
 158   static size_t reserved_in_bytes(Metaspace::MetadataType mdtype);
 159