RFR: 8345655: Move reservation code out of ReservedSpace [v3]

Stefan Karlsson stefank at openjdk.org
Tue Dec 17 09:57:39 UTC 2024


On Fri, 13 Dec 2024 13:36:15 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> My reasoning was that MemoryReserver does not have the ownership of the ReservedSpace instance, so I didn't want it to be the one clearing the members. If others feel the same way as you do, then I would prefer to add a function release_and_clear to make it clearer (:)) what's going on.
>
> `release_and_clear`does sound clearer :)

My preference is to stay with the current proposal and let code that requested reserve memory decide if and when the ReservedSpace should be cleared. I think it would be an easy thing to reevaluate in another RFE if we change our minds later on.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22712#discussion_r1888222021


More information about the shenandoah-dev mailing list