48 // | ||---------- |
49 // +------>||| block 0 | |
50 // ||---------- |
51 // ||| block 1 | |
52 // ||---------- |
53 // || |
54 // |-------------------|
55 // | |
56 // | |
57 // +-------------------+
58 //
59
60 class ChunkManager;
61 class ClassLoaderData;
62 class Metablock;
63 class Metachunk;
64 class MetaspaceTracer;
65 class MetaWord;
66 class Mutex;
67 class outputStream;
68 class SpaceManager;
69 class VirtualSpaceList;
70
71 // Metaspaces each have a SpaceManager and allocations
72 // are done by the SpaceManager. Allocations are done
73 // out of the current Metachunk. When the current Metachunk
74 // is exhausted, the SpaceManager gets a new one from
75 // the current VirtualSpace. When the VirtualSpace is exhausted
76 // the SpaceManager gets a new one. The SpaceManager
77 // also manages freelists of available Chunks.
78 //
79 // Currently the space manager maintains the list of
80 // virtual spaces and the list of chunks in use. Its
81 // allocate() method returns a block for use as a
82 // quantum of metadata.
83
84 class Metaspace : public CHeapObj<mtClass> {
85 friend class VMStructs;
86 friend class SpaceManager;
87 friend class VM_CollectForMetadataAllocation;
88 friend class MetaspaceGC;
89 friend class MetaspaceAux;
90
91 public:
92 enum MetadataType {
93 ClassType,
94 NonClassType,
95 MetadataTypeCount
96 };
97 enum MetaspaceType {
98 StandardMetaspaceType,
99 BootMetaspaceType,
100 ROMetaspaceType,
101 ReadWriteMetaspaceType,
102 AnonymousMetaspaceType,
103 ReflectionMetaspaceType
104 };
105
106 private:
107 static void verify_global_initialization();
108
109 void initialize(Mutex* lock, MetaspaceType type);
|
48 // | ||---------- |
49 // +------>||| block 0 | |
50 // ||---------- |
51 // ||| block 1 | |
52 // ||---------- |
53 // || |
54 // |-------------------|
55 // | |
56 // | |
57 // +-------------------+
58 //
59
60 class ChunkManager;
61 class ClassLoaderData;
62 class Metablock;
63 class Metachunk;
64 class MetaspaceTracer;
65 class MetaWord;
66 class Mutex;
67 class outputStream;
68 class ShenandoahCollectorPolicy;
69 class SpaceManager;
70 class VirtualSpaceList;
71
72 // Metaspaces each have a SpaceManager and allocations
73 // are done by the SpaceManager. Allocations are done
74 // out of the current Metachunk. When the current Metachunk
75 // is exhausted, the SpaceManager gets a new one from
76 // the current VirtualSpace. When the VirtualSpace is exhausted
77 // the SpaceManager gets a new one. The SpaceManager
78 // also manages freelists of available Chunks.
79 //
80 // Currently the space manager maintains the list of
81 // virtual spaces and the list of chunks in use. Its
82 // allocate() method returns a block for use as a
83 // quantum of metadata.
84
85 class Metaspace : public CHeapObj<mtClass> {
86 friend class VMStructs;
87 friend class SpaceManager;
88 friend class VM_CollectForMetadataAllocation;
89 friend class MetaspaceGC;
90 friend class MetaspaceAux;
91 friend class ShenandoahCollectorPolicy;
92
93 public:
94 enum MetadataType {
95 ClassType,
96 NonClassType,
97 MetadataTypeCount
98 };
99 enum MetaspaceType {
100 StandardMetaspaceType,
101 BootMetaspaceType,
102 ROMetaspaceType,
103 ReadWriteMetaspaceType,
104 AnonymousMetaspaceType,
105 ReflectionMetaspaceType
106 };
107
108 private:
109 static void verify_global_initialization();
110
111 void initialize(Mutex* lock, MetaspaceType type);
|