RFR: 8286870: Memory leak with RepeatCompilation
Tobias Hartmann
thartmann at openjdk.java.net
Tue May 17 11:56:21 UTC 2022
While using `RepeatCompilation` in combination with replay compilation and stress options to reproduce an intermittent issue, I noticed that it does not free the compiler thread arena after each compilation, leading to a (temporary) memory leak and out of memory errors. For example, each compilation of [JDK-8280696](https://bugs.openjdk.java.net/browse/JDK-8280696) allocates an additional 1218 kB.
The fix is to simply add a `ResourceMark` in the loop.
Thanks,
Tobias
-------------
Commit messages:
- 8286870: Memory leak with RepeatCompilation
Changes: https://git.openjdk.java.net/jdk/pull/8744/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8744&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8286870
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/8744.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8744/head:pull/8744
PR: https://git.openjdk.java.net/jdk/pull/8744
More information about the hotspot-compiler-dev
mailing list