RFR: 8312200: Fix Parse::catch_call_exceptions memory leak

Vladimir Kozlov kvn at openjdk.org
Tue Jul 18 16:09:13 UTC 2023


On Tue, 18 Jul 2023 11:33:38 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Hi,
> 
> We used to allocate some `GrowableArray`s onto the `node_arena` in `Parse::catch_call_exceptions`. This leaves the allocated memory until the compilation has finished, potentially increasing the maximum memory usage. I've fixed this by allocating the memory on a temporary `Arena` instead. I also switched the `GrowableArray`s themselves to being stack allocated.
> 
> Also a few stylistic issues were addressed.

Looks good.

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14921#pullrequestreview-1535407217


More information about the hotspot-compiler-dev mailing list