Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
10984:cd2118b62475 | 10986:1f4355cee9a2 |
---|---|
751 | 751 |
752 // clear the shared memory region | 752 // clear the shared memory region |
753 (void)::memset((void*) mapAddress, 0, size); | 753 (void)::memset((void*) mapAddress, 0, size); |
754 | 754 |
755 // it does not go through os api, the operation has to record from here | 755 // it does not go through os api, the operation has to record from here |
756 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); | 756 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); |
757 MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); | |
758 | 757 |
759 return mapAddress; | 758 return mapAddress; |
760 } | 759 } |
761 | 760 |
762 // release a named shared memory region | 761 // release a named shared memory region |
917 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), | 916 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), |
918 "Could not map PerfMemory"); | 917 "Could not map PerfMemory"); |
919 } | 918 } |
920 | 919 |
921 // it does not go through os api, the operation has to record from here | 920 // it does not go through os api, the operation has to record from here |
922 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); | 921 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); |
923 MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); | |
924 | 922 |
925 *addr = mapAddress; | 923 *addr = mapAddress; |
926 *sizep = size; | 924 *sizep = size; |
927 | 925 |
928 if (PerfTraceMemOps) { | 926 if (PerfTraceMemOps) { |