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, mtInternal, CURRENT_PC); |
756 MemTracker::record_virtual_memory_reserve_and_commit((address)mapAddress, size, CURRENT_PC, mtInternal); |
757 |
757 |
758 return mapAddress; |
758 return mapAddress; |
759 } |
759 } |
760 |
760 |
761 // release a named shared memory region |
761 // release a named shared memory region |
916 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), |
916 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), |
917 "Could not map PerfMemory"); |
917 "Could not map PerfMemory"); |
918 } |
918 } |
919 |
919 |
920 // 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 |
921 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); |
921 MemTracker::record_virtual_memory_reserve_and_commit((address)mapAddress, size, CURRENT_PC, mtInternal); |
922 |
922 |
923 *addr = mapAddress; |
923 *addr = mapAddress; |
924 *sizep = size; |
924 *sizep = size; |
925 |
925 |
926 if (PerfTraceMemOps) { |
926 if (PerfTraceMemOps) { |