Mercurial > hg > graal-jvmci-8
comparison src/os/linux/vm/perfMemory_linux.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 | 2c2a99f6cf83 |
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 |
915 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), | 914 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), |
916 "Could not map PerfMemory"); | 915 "Could not map PerfMemory"); |
917 } | 916 } |
918 | 917 |
919 // it does not go through os api, the operation has to record from here | 918 // it does not go through os api, the operation has to record from here |
920 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); | 919 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); |
921 MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); | |
922 | 920 |
923 *addr = mapAddress; | 921 *addr = mapAddress; |
924 *sizep = size; | 922 *sizep = size; |
925 | 923 |
926 if (PerfTraceMemOps) { | 924 if (PerfTraceMemOps) { |