RFR: 8330076: [NMT] add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API [v13]

Thomas Stuefe stuefe at openjdk.org
Tue Apr 23 06:49:35 UTC 2024


On Tue, 23 Apr 2024 06:18:14 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removed extra blank line.
>
> src/hotspot/share/gc/parallel/mutableSpace.cpp line 63:
> 
>> 61:       if (clear_space) {
>> 62:         // Prefer page reallocation to migration.
>> 63:         os::free_memory((char*)start, size, page_size, mtGC);
> 
> Not at all obvious where the corresponding allocation sets the type as mtGC. ??

We don't, and I am not sure this is right. AFAICS this API is used on java heap, in ParallelGC. So, that should be mtJavaHeap, I think.

Note that I would like and plan to simplify this API, if possible remove both the page size and the NMT flags. See https://bugs.openjdk.org/browse/JDK-8330144. (the tricky part is to make sure the proposed Linux alternative works with large pages and on old enough kernels)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1575726805


More information about the shenandoah-dev mailing list