Mercurial > hg > truffle
diff src/share/vm/runtime/os.cpp @ 10221:c18152e0554e
8013120: NMT: Kitchensink crashes with assert(next_region == NULL || !next_region->is_committed_region()) failed: Sanity check
Summary: Fixed NMT to deal with releasing virtual memory region when there are still committed regions within it
Reviewed-by: acorn, coleenp
author | zgu |
---|---|
date | Mon, 06 May 2013 11:15:13 -0400 |
parents | 81d1b58c078f |
children | f2110083203d |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.cpp Fri May 03 15:51:16 2013 -0700 +++ b/src/share/vm/runtime/os.cpp Mon May 06 11:15:13 2013 -0400 @@ -1457,6 +1457,18 @@ return result; } + +char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint, + MEMFLAGS flags) { + char* result = pd_reserve_memory(bytes, addr, alignment_hint); + if (result != NULL) { + MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); + MemTracker::record_virtual_memory_type((address)result, flags); + } + + return result; +} + char* os::attempt_reserve_memory_at(size_t bytes, char* addr) { char* result = pd_attempt_reserve_memory_at(bytes, addr); if (result != NULL) {