< prev index next >

src/hotspot/share/memory/metaspace/metaspaceContext.cpp

Print this page

58 // Create a new, empty, non-expandable metaspace context atop of an externally provided space.
59 MetaspaceContext* MetaspaceContext::create_nonexpandable_context(const char* name, ReservedSpace rs, CommitLimiter* commit_limiter) {
60   VirtualSpaceList* vsl = new VirtualSpaceList(name, rs, commit_limiter);
61   ChunkManager* cm = new ChunkManager(name, vsl);
62   return new MetaspaceContext(name, vsl, cm);
63 }
64 
65 void MetaspaceContext::initialize_class_space_context(ReservedSpace rs) {
66   _class_space_context = create_nonexpandable_context("class-space", rs, CommitLimiter::globalLimiter());
67 }
68 
69 void MetaspaceContext::initialize_nonclass_space_context() {
70   _nonclass_space_context = create_expandable_context("non-class-space", CommitLimiter::globalLimiter());
71 }
72 
73 void MetaspaceContext::print_on(outputStream* st) const {
74   _vslist->print_on(st);
75   _cm->print_on(st);
76 }
77 












78 #ifdef ASSERT
79 void MetaspaceContext::verify() const {
80   _vslist->verify();
81   _cm->verify();
82 }
83 #endif // ASSERT
84 
85 } // namespace metaspace
86 

58 // Create a new, empty, non-expandable metaspace context atop of an externally provided space.
59 MetaspaceContext* MetaspaceContext::create_nonexpandable_context(const char* name, ReservedSpace rs, CommitLimiter* commit_limiter) {
60   VirtualSpaceList* vsl = new VirtualSpaceList(name, rs, commit_limiter);
61   ChunkManager* cm = new ChunkManager(name, vsl);
62   return new MetaspaceContext(name, vsl, cm);
63 }
64 
65 void MetaspaceContext::initialize_class_space_context(ReservedSpace rs) {
66   _class_space_context = create_nonexpandable_context("class-space", rs, CommitLimiter::globalLimiter());
67 }
68 
69 void MetaspaceContext::initialize_nonclass_space_context() {
70   _nonclass_space_context = create_expandable_context("non-class-space", CommitLimiter::globalLimiter());
71 }
72 
73 void MetaspaceContext::print_on(outputStream* st) const {
74   _vslist->print_on(st);
75   _cm->print_on(st);
76 }
77 
78 size_t MetaspaceContext::used_words() const {
79   return _used_words_counter.get();
80 }
81 
82 size_t MetaspaceContext::committed_words() const {
83   return _vslist->committed_words();
84 }
85 
86 size_t MetaspaceContext::reserved_words() const {
87   return _vslist->reserved_words();
88 }
89 
90 #ifdef ASSERT
91 void MetaspaceContext::verify() const {
92   _vslist->verify();
93   _cm->verify();
94 }
95 #endif // ASSERT
96 
97 } // namespace metaspace
98 
< prev index next >