NMT and os::split_reserved_memory?
Zhengyu Gu
zgu at redhat.com
Thu Apr 23 15:51:33 UTC 2020
Hi Thomas,
On 4/23/20 10:05 AM, Thomas Stüfe wrote:
> Hi,
>
> How does NMT handle os::split_reserved_memory?
I don't think NMT handles it.
>
> Lets say I reserve a space, then split it into two spaces
> using os::split_reserved_memory() (which really is a noop for most
> platforms). Then I want to set both spaces to different flags.
You can remove the whole region, then create two separate regions.
The intricate part is when the region contains committed regions, I am
not so sure how virtual memory system behaves.
Thanks,
-Zhengyu
>
> Setting the second one triggers an assert: assert(reserved_rgn->flag() ==
> mtNone, "Overwrite memory type");
>
> since I assume NMT is not aware that splitting happened.
>
> What would be the correct way to go here? Can I somehow inform NMT that
> this region has been split? I assume within NMT both split regions are
> still represented by one reserved_rgn object.
>
> Thank you,
>
> Thomas
>
More information about the hotspot-dev
mailing list