RFR: 8330076: [NMT] add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API
Thomas Stuefe
stuefe at openjdk.org
Fri Apr 12 07:42:42 UTC 2024
On Thu, 11 Apr 2024 16:27:51 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
> > Another idea: To alleviate the need to pass MEMFLAGS all the time, could we have something like a "active MEMFLAGS" state per Thread, and set that stack-based with a XXMark object? That way, one could say at the entrance of Metaspace, for instance, "whatever is allocated under the scope of this function, please mark with mtMetaspace".
>
> Not sure if I understood your idea, the question is if a thread always uses only ONE type of memory and not mix of them? For example, CDS uses both mtClass and mtClassShared. If a Thread has an active MEMFLAGS, it has to switch this flag between A and B whenever it uses type A or B.
No, the idea was to do it stack-based with a chained mark object. But never mind, we can do this in a follow up PR. Maybe it has no merit.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18745#issuecomment-2051192960
More information about the shenandoah-dev
mailing list