src/share/vm/memory/metaspace.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/memory/metaspace.hpp Thu Sep 19 21:38:05 2013
--- new/src/share/vm/memory/metaspace.hpp Thu Sep 19 21:38:05 2013
*** 54,69 ****
--- 54,72 ----
// | |
// | |
// +-------------------+
//
+ class ChunkManager;
class ClassLoaderData;
class Metablock;
+ class Metachunk;
class MetaWord;
class Mutex;
class outputStream;
class SpaceManager;
+ class VirtualSpaceList;
// Metaspaces each have a SpaceManager and allocations
// are done by the SpaceManager. Allocations are done
// out of the current Metachunk. When the current Metachunk
// is exhausted, the SpaceManager gets a new one from
*** 74,85 ****
--- 77,86 ----
// Currently the space manager maintains the list of
// virtual spaces and the list of chunks in use. Its
// allocate() method returns a block for use as a
// quantum of metadata.
class VirtualSpaceList;
class Metaspace : public CHeapObj<mtClass> {
friend class VMStructs;
friend class SpaceManager;
friend class VM_CollectForMetadataAllocation;
friend class MetaspaceGC;
*** 100,109 ****
--- 101,114 ----
};
private:
void initialize(Mutex* lock, MetaspaceType type);
+ Metachunk* get_initialization_chunk(MetadataType mdtype,
+ size_t chunk_word_size,
+ size_t chunk_bunch);
+
// Align up the word size to the allocation word size
static size_t align_word_size_up(size_t);
// Aligned size of the metaspace.
static size_t _class_metaspace_size;
*** 132,148 ****
--- 137,163 ----
// Virtual Space lists for both classes and other metadata
static VirtualSpaceList* _space_list;
static VirtualSpaceList* _class_space_list;
+ static ChunkManager* _chunk_manager_metadata;
+ static ChunkManager* _chunk_manager_class;
+
static VirtualSpaceList* space_list() { return _space_list; }
static VirtualSpaceList* class_space_list() { return _class_space_list; }
static VirtualSpaceList* get_space_list(MetadataType mdtype) {
assert(mdtype != MetadataTypeCount, "MetadaTypeCount can't be used as mdtype");
return mdtype == ClassType ? class_space_list() : space_list();
}
+ static ChunkManager* chunk_manager_metadata() { return _chunk_manager_metadata; }
+ static ChunkManager* chunk_manager_class() { return _chunk_manager_class; }
+ static ChunkManager* get_chunk_manager(MetadataType mdtype) {
+ assert(mdtype != MetadataTypeCount, "MetadaTypeCount can't be used as mdtype");
+ return mdtype == ClassType ? chunk_manager_class() : chunk_manager_metadata();
+ }
+
// This is used by DumpSharedSpaces only, where only _vsm is used. So we will
// maintain a single list for now.
void record_allocation(void* ptr, MetaspaceObj::Type type, size_t word_size);
#ifdef _LP64
*** 197,206 ****
--- 212,222 ----
static bool contains(const void *ptr);
void dump(outputStream* const out) const;
// Free empty virtualspaces
+ static void purge(MetadataType mdtype);
static void purge();
void print_on(outputStream* st) const;
// Debugging support
void verify();
src/share/vm/memory/metaspace.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File