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

Johan Sjölen jsjolen at openjdk.org
Fri Oct 21 11:12:51 UTC 2022


On Thu, 13 Oct 2022 19:57:04 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> 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

This looks good to me, thanks for the changes.

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

Marked as reviewed by jsjolen (Committer).

PR: https://git.openjdk.org/jdk/pull/10686


More information about the hotspot-runtime-dev mailing list