RFR: 8351444: Shenandoah: Class Unloading may encounter recycled oops [v3]

Aleksey Shipilev shade at openjdk.org
Wed Mar 12 13:39:53 UTC 2025


On Tue, 11 Mar 2025 19:01:31 GMT, William Kemper <wkemper at openjdk.org> wrote:

> A region will be usable for allocation as soon as it is recycled, so, in a sense, this has the same effect as turning off the weak roots flag immediately after class unloading.

Right. This answers my original question.

> What do you think? This would be a separate PR of course, but do you see any reason something like this wouldn't work?

It looks to me as stretching the definition of "trash" even further? I think it would be conceptually cleaner to never turn regular regions into trash until after weak roots are done. So accesses to "dead" weak roots are still possible like a regular access to "regular" region.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23951#discussion_r1991522731


More information about the shenandoah-dev mailing list