55 // | | |
55 // | | |
56 // +-------------------+ |
56 // +-------------------+ |
57 // |
57 // |
58 |
58 |
59 class ClassLoaderData; |
59 class ClassLoaderData; |
|
60 class Metablock; |
60 class MetaWord; |
61 class MetaWord; |
61 class Mutex; |
62 class Mutex; |
62 class outputStream; |
63 class outputStream; |
63 class FreeChunk; |
|
64 template <class Chunk_t> class FreeList; |
|
65 template <class Chunk_t> class BinaryTreeDictionary; |
|
66 class SpaceManager; |
64 class SpaceManager; |
67 |
65 |
68 // Metaspaces each have a SpaceManager and allocations |
66 // Metaspaces each have a SpaceManager and allocations |
69 // are done by the SpaceManager. Allocations are done |
67 // are done by the SpaceManager. Allocations are done |
70 // out of the current Metachunk. When the current Metachunk |
68 // out of the current Metachunk. When the current Metachunk |
126 size_t used_words(MetadataType mdtype) const; |
124 size_t used_words(MetadataType mdtype) const; |
127 size_t free_words(MetadataType mdtype) const; |
125 size_t free_words(MetadataType mdtype) const; |
128 size_t capacity_words(MetadataType mdtype) const; |
126 size_t capacity_words(MetadataType mdtype) const; |
129 size_t waste_words(MetadataType mdtype) const; |
127 size_t waste_words(MetadataType mdtype) const; |
130 |
128 |
131 static MetaWord* allocate(ClassLoaderData* loader_data, size_t size, |
129 static Metablock* allocate(ClassLoaderData* loader_data, size_t size, |
132 bool read_only, MetadataType mdtype, TRAPS); |
130 bool read_only, MetadataType mdtype, TRAPS); |
133 void deallocate(MetaWord* ptr, size_t byte_size, bool is_class); |
131 void deallocate(MetaWord* ptr, size_t byte_size, bool is_class); |
134 |
132 |
135 MetaWord* expand_and_allocate(size_t size, |
133 MetaWord* expand_and_allocate(size_t size, |
136 MetadataType mdtype); |
134 MetadataType mdtype); |