mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
7199092: NMT: NMT needs to deal overlapped virtual memory ranges
Enhanced virtual memory tracking to track committed regions as well as reserved regions, so NMT now can generate virtual memory map. Reviewed-by: acorn, coleenp
This commit is contained in:
parent
240b5c9329
commit
3e481cdd81
29 changed files with 800 additions and 364 deletions
|
@ -158,13 +158,18 @@ HandleMark::~HandleMark() {
|
|||
|
||||
// Delete later chunks
|
||||
if( _chunk->next() ) {
|
||||
// reset arena size before delete chunks. Otherwise, the total
|
||||
// arena size could exceed total chunk size
|
||||
assert(area->size_in_bytes() > size_in_bytes(), "Sanity check");
|
||||
area->set_size_in_bytes(size_in_bytes());
|
||||
_chunk->next_chop();
|
||||
} else {
|
||||
assert(area->size_in_bytes() == size_in_bytes(), "Sanity check");
|
||||
}
|
||||
// Roll back arena to saved top markers
|
||||
area->_chunk = _chunk;
|
||||
area->_hwm = _hwm;
|
||||
area->_max = _max;
|
||||
area->set_size_in_bytes(_size_in_bytes);
|
||||
#ifdef ASSERT
|
||||
// clear out first chunk (to detect allocation bugs)
|
||||
if (ZapVMHandleArea) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue