RFR: 8260262: Use common code in function unmap_shared() in perfMemory_posix.cpp

Coleen Phillimore coleenp at openjdk.java.net
Mon Aug 9 17:20:31 UTC 2021


On Wed, 4 Aug 2021 17:15:46 GMT, Harold Seigel <hseigel at openjdk.org> wrote:

> Please review this change to use common code in function unmap_shared() in perfMemory_posix.cpp, to fix JDK-8260262.  The change calls munmap() directly to deallocate the memory because functions mmap_create_shared() and mmap_attach_shared() call mmap() directly to allocate the memory.
> 
> The change was tested by running Mach5 tiers 1-2 on Linux, MacOS, and Windows, and Mach5 tiers 3-5 on Linux x64 and MacOS x64.
> 
> Note that testing on AIX is needed.
> 
> Thanks, Harold

src/hotspot/os/posix/perfMemory_posix.cpp line 1036:

> 1034:   }
> 1035: #else
> 1036:   os::release_memory(addr, bytes);

Why doesn't AIX call munmap with os::release_memory() and then do this NMT tracking?

-------------

PR: https://git.openjdk.java.net/jdk/pull/4995


More information about the hotspot-runtime-dev mailing list