diff src/os/bsd/vm/perfMemory_bsd.cpp @ 10986:1f4355cee9a2

8013651: NMT: reserve/release sequence id's in incorrect order due to race Summary: Fixed NMT race condition for realloc, uncommit and release Reviewed-by: coleenp, ccheung
author zgu
date Tue, 18 Jun 2013 08:44:08 -0400
parents e95fc50106cf
children 78bbf4d43a14
line wrap: on
line diff
--- a/src/os/bsd/vm/perfMemory_bsd.cpp	Mon Jun 10 10:45:19 2013 -0400
+++ b/src/os/bsd/vm/perfMemory_bsd.cpp	Tue Jun 18 08:44:08 2013 -0400
@@ -753,8 +753,7 @@
   (void)::memset((void*) 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);
+  MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC);
 
   return mapAddress;
 }
@@ -919,8 +918,7 @@
   }
 
   // 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);
+  MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC);
 
   *addr = mapAddress;
   *sizep = size;