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

Ioi Lam iklam at openjdk.org
Thu Oct 27 05:17:27 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge branch 'master' into 8286431-do-not-use-resource-alloc-in-mmap_attach_shared
 - @dholmes-ora comments
 - 8286431: Do not use resource array in posix mmap_attach_shared()

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

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

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

  Stats: 161898 lines in 1927 files changed: 92024 ins; 35908 del; 33966 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