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:
Zhengyu Gu 2012-10-19 21:40:07 -04:00
parent 240b5c9329
commit 3e481cdd81
29 changed files with 800 additions and 364 deletions

View file

@ -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) {