RFR: 8286431: Do not use resource array in posix mmap_attach_shared() [v2]

Ioi Lam iklam at openjdk.org
Thu Oct 13 19:57:04 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.

Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:

  @dholmes-ora comments

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10686/files
  - new: https://git.openjdk.org/jdk/pull/10686/files/f77cc07b..6e99ca65

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10686&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10686&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 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