src/os/linux/vm/os_linux.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/os/linux/vm/os_linux.cpp

src/os/linux/vm/os_linux.cpp

Print this page

        

*** 3204,3228 **** if ((addr != NULL) && UseNUMAInterleaving) { numa_make_global(addr, bytes); } // The memory is committed ! address pc = CALLER_PC; ! MemTracker::record_virtual_memory_reserve((address)addr, bytes, pc); ! MemTracker::record_virtual_memory_commit((address)addr, bytes, pc); return addr; } bool os::release_memory_special(char* base, size_t bytes) { // detaching the SHM segment will also delete it, see reserve_memory_special() int rslt = shmdt(base); if (rslt == 0) { ! MemTracker::record_virtual_memory_uncommit((address)base, bytes); ! MemTracker::record_virtual_memory_release((address)base, bytes); return true; } else { return false; } } size_t os::large_page_size() { --- 3204,3229 ---- if ((addr != NULL) && UseNUMAInterleaving) { numa_make_global(addr, bytes); } // The memory is committed ! NMTTrackOp op(NMTTrackOp::ReserveAndCommitOp); ! op.execute_op((address)addr, bytes, 0, CALLER_PC); return addr; } bool os::release_memory_special(char* base, size_t bytes) { + NMTTrackOp op(NMTTrackOp::ReleaseOp); + // detaching the SHM segment will also delete it, see reserve_memory_special() int rslt = shmdt(base); if (rslt == 0) { ! op.execute_op((address)base, bytes); return true; } else { + op.abort_op(); return false; } } size_t os::large_page_size() {
src/os/linux/vm/os_linux.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File