8203865: Metaspace cleanup: Remove unused MemRegion in VirtualSpaceNode
Reviewed-by: dholmes, zgu
This commit is contained in:
parent
5635d6f937
commit
113924e979
@ -521,16 +521,6 @@ bool VirtualSpaceNode::initialize() {
|
|||||||
"Checking that the pre-committed memory was registered by the VirtualSpace");
|
"Checking that the pre-committed memory was registered by the VirtualSpace");
|
||||||
|
|
||||||
set_top((MetaWord*)virtual_space()->low());
|
set_top((MetaWord*)virtual_space()->low());
|
||||||
set_reserved(MemRegion((HeapWord*)_rs.base(),
|
|
||||||
(HeapWord*)(_rs.base() + _rs.size())));
|
|
||||||
|
|
||||||
assert(reserved()->start() == (HeapWord*) _rs.base(),
|
|
||||||
"Reserved start was not set properly " PTR_FORMAT
|
|
||||||
" != " PTR_FORMAT, p2i(reserved()->start()), p2i(_rs.base()));
|
|
||||||
assert(reserved()->word_size() == _rs.size() / BytesPerWord,
|
|
||||||
"Reserved size was not set properly " SIZE_FORMAT
|
|
||||||
" != " SIZE_FORMAT, reserved()->word_size(),
|
|
||||||
_rs.size() / BytesPerWord);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize Occupancy Map.
|
// Initialize Occupancy Map.
|
||||||
|
@ -49,7 +49,6 @@ class VirtualSpaceNode : public CHeapObj<mtClass> {
|
|||||||
const bool _is_class;
|
const bool _is_class;
|
||||||
|
|
||||||
// total in the VirtualSpace
|
// total in the VirtualSpace
|
||||||
MemRegion _reserved;
|
|
||||||
ReservedSpace _rs;
|
ReservedSpace _rs;
|
||||||
VirtualSpace _virtual_space;
|
VirtualSpace _virtual_space;
|
||||||
MetaWord* _top;
|
MetaWord* _top;
|
||||||
@ -102,11 +101,9 @@ class VirtualSpaceNode : public CHeapObj<mtClass> {
|
|||||||
VirtualSpaceNode* next() { return _next; }
|
VirtualSpaceNode* next() { return _next; }
|
||||||
void set_next(VirtualSpaceNode* v) { _next = v; }
|
void set_next(VirtualSpaceNode* v) { _next = v; }
|
||||||
|
|
||||||
void set_reserved(MemRegion const v) { _reserved = v; }
|
|
||||||
void set_top(MetaWord* v) { _top = v; }
|
void set_top(MetaWord* v) { _top = v; }
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
MemRegion* reserved() { return &_reserved; }
|
|
||||||
VirtualSpace* virtual_space() const { return (VirtualSpace*) &_virtual_space; }
|
VirtualSpace* virtual_space() const { return (VirtualSpace*) &_virtual_space; }
|
||||||
|
|
||||||
// Returns true if "word_size" is available in the VirtualSpace
|
// Returns true if "word_size" is available in the VirtualSpace
|
||||||
@ -135,8 +132,7 @@ class VirtualSpaceNode : public CHeapObj<mtClass> {
|
|||||||
// Allocate a chunk from the virtual space and return it.
|
// Allocate a chunk from the virtual space and return it.
|
||||||
Metachunk* get_chunk_vs(size_t chunk_word_size);
|
Metachunk* get_chunk_vs(size_t chunk_word_size);
|
||||||
|
|
||||||
// Expands/shrinks the committed space in a virtual space. Delegates
|
// Expands the committed space by at least min_words words.
|
||||||
// to Virtualspace
|
|
||||||
bool expand_by(size_t min_words, size_t preferred_words);
|
bool expand_by(size_t min_words, size_t preferred_words);
|
||||||
|
|
||||||
// In preparation for deleting this node, remove all the chunks
|
// In preparation for deleting this node, remove all the chunks
|
||||||
|
Loading…
Reference in New Issue
Block a user