mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8013651: NMT: reserve/release sequence id's in incorrect order due to race
Fixed NMT race condition for realloc, uncommit and release Reviewed-by: coleenp, ccheung
This commit is contained in:
parent
87505d60f6
commit
61a30f035b
14 changed files with 464 additions and 252 deletions
|
@ -753,8 +753,7 @@ static char* mmap_create_shared(size_t size) {
|
|||
(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 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
|
|||
}
|
||||
|
||||
// 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue