RFR: 8286431: Do not use resource array in posix mmap_attach_shared()
Ioi Lam
iklam at openjdk.org
Thu Oct 13 03:54:42 UTC 2022
Please review this small clean up
perfMemory_posix.cpp uses a lot of explicit C heap alloc/free because the function may be called during early VM bootstrap, before ResourceMark can be used.
However, we have a single odd use of resource allocation in this file. It's supposed to work with Java exceptions. However, the code actually makes an explicitly exception check, so there's no need to do the resource alloc at all.
Also, there's no need to close the fd in case of exception.
-------------
Commit messages:
- 8286431: Do not use resource array in posix mmap_attach_shared()
Changes: https://git.openjdk.org/jdk/pull/10686/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10686&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8286431
Stats: 18 lines in 1 file changed: 1 ins; 13 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/10686.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10686/head:pull/10686
PR: https://git.openjdk.org/jdk/pull/10686
More information about the hotspot-runtime-dev
mailing list