Integrated: 8286431: Do not use resource array in posix mmap_attach_shared()

Ioi Lam iklam at openjdk.org
Thu Oct 27 05:19:09 UTC 2022


On Thu, 13 Oct 2022 03:48:03 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.

This pull request has now been integrated.

Changeset: 521e7122
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/521e71222a8a01edcffedafb2d57c16aa070545c
Stats:     19 lines in 1 file changed: 1 ins; 14 del; 4 mod

8286431: Do not use resource array in posix mmap_attach_shared()

Reviewed-by: dholmes, jsjolen

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

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


More information about the hotspot-runtime-dev mailing list