RFR: 8312200: Fix Parse::catch_call_exceptions memory leak

Johan Sjölen jsjolen at openjdk.org
Tue Jul 18 11:41:28 UTC 2023


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.

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

Commit messages:
 - Fix memory leak

Changes: https://git.openjdk.org/jdk/pull/14921/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14921&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8312200
  Stats: 20 lines in 1 file changed: 1 ins; 0 del; 19 mod
  Patch: https://git.openjdk.org/jdk/pull/14921.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14921/head:pull/14921

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


More information about the hotspot-compiler-dev mailing list