Mercurial > hg > graal-jvmci-8
comparison src/os/solaris/vm/perfMemory_solaris.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 |
---|---|
766 | 766 |
767 // clear the shared memory region | 767 // clear the shared memory region |
768 (void)::memset((void*) mapAddress, 0, size); | 768 (void)::memset((void*) mapAddress, 0, size); |
769 | 769 |
770 // it does not go through os api, the operation has to record from here | 770 // it does not go through os api, the operation has to record from here |
771 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); | 771 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); |
772 MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); | |
773 | 772 |
774 return mapAddress; | 773 return mapAddress; |
775 } | 774 } |
776 | 775 |
777 // release a named shared memory region | 776 // release a named shared memory region |
930 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), | 929 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), |
931 "Could not map PerfMemory"); | 930 "Could not map PerfMemory"); |
932 } | 931 } |
933 | 932 |
934 // it does not go through os api, the operation has to record from here | 933 // it does not go through os api, the operation has to record from here |
935 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); | 934 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); |
936 MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); | |
937 | 935 |
938 *addr = mapAddress; | 936 *addr = mapAddress; |
939 *sizep = size; | 937 *sizep = size; |
940 | 938 |
941 if (PerfTraceMemOps) { | 939 if (PerfTraceMemOps) { |