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

src/os/windows/vm/perfMemory_windows.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 1496,1507 **** // clear the shared memory region (void)memset(mapAddress, '\0', size); // it does not go through os api, the operation has to record from here ! MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); ! MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); return (char*) mapAddress; } // this method deletes the file mapping object. --- 1496,1507 ---- // clear the shared memory region (void)memset(mapAddress, '\0', size); // it does not go through os api, the operation has to record from here ! NMTTrackOp op(NMTTrackOp::ReserveOp); ! op.execute_op((address)mapAddress, size, mtInternal, CURRENT_PC); return (char*) mapAddress; } // this method deletes the file mapping object.
*** 1679,1691 **** THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), "Could not map PerfMemory"); } // it does not go through os api, the operation has to record from here ! MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); ! MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); ! *addrp = (char*)mapAddress; *sizep = size; // File mapping object can be closed at this time without --- 1679,1690 ---- THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), "Could not map PerfMemory"); } // it does not go through os api, the operation has to record from here ! NMTTrackOp op(NMTTrackOp::ReserveOp); ! op.execute_op((address)mapAddress, size, mtInternal, CURRENT_PC); *addrp = (char*)mapAddress; *sizep = size; // File mapping object can be closed at this time without
*** 1834,1846 **** if (PerfMemory::contains(addr) || PerfMemory::contains(addr + bytes - 1)) { // prevent accidental detachment of this process's PerfMemory region return; } remove_file_mapping(addr); - // it does not go through os api, the operation has to record from here - MemTracker::record_virtual_memory_release((address)addr, bytes); } char* PerfMemory::backing_store_filename() { return sharedmem_fileName; } --- 1833,1847 ---- if (PerfMemory::contains(addr) || PerfMemory::contains(addr + bytes - 1)) { // prevent accidental detachment of this process's PerfMemory region return; } + // remove_file_mapping() does not go through os api, need to notify + // NMT from here, before actually released + NMTTrackOp op(NMTTrackOp::ReleaseOp); + op.execute_op((address)addr, bytes); remove_file_mapping(addr); } char* PerfMemory::backing_store_filename() { return sharedmem_fileName; }
src/os/windows/vm/perfMemory_windows.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File