RFR: 8306456: Don't leak _worklist's memory in PhaseLive::compute [v2]
Johan Sjölen
jsjolen at openjdk.org
Thu Apr 20 12:05:49 UTC 2023
> `PhaseLive::compute` used to do this: `_worklist = new (_arena) Block_List();`. This allocates the `Block_List` to the `_arena`, but the backing array is allocated on the resource area: `Block_List() : Block_Array(Thread::current()->resource_area()), _cnt(0) {}`. This causes at most 5 worklists and at least 4 worklists to be created and not freed until the compilation is finished. This patch allocates the worklist within `PhaseLive::compute`:s local resource mark.
Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
Fix style and make worklist passed in as argument
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13535/files
- new: https://git.openjdk.org/jdk/pull/13535/files/e1191341..8c436ab9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13535&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13535&range=00-01
Stats: 17 lines in 2 files changed: 0 ins; 3 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/13535.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13535/head:pull/13535
PR: https://git.openjdk.org/jdk/pull/13535
More information about the hotspot-compiler-dev
mailing list