NMT and os::split_reserved_memory?

Thomas Stüfe thomas.stuefe at gmail.com
Thu Apr 23 14:05:52 UTC 2020


Hi,

How does NMT handle os::split_reserved_memory?

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.

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