RFR: JDK-8271252: os::reserve_memory should not use mtOther as default NMT flag

Evgeny Astigeevich duke at openjdk.org
Tue Jun 28 11:47:46 UTC 2022


On Sat, 25 Jun 2022 05:39:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Small cleanup.
> 
> We use mtOther as default NMT flag for os::reserve_memory():
> 
> `static char* reserve_memory(size_t bytes, bool executable = false, MEMFLAGS flags = mtOther);`
> 
> mtOther marks allocations coming from outside the VM. It is not a good default flag. Note that in the end mtOther then was ignored in os::reserve_memory() and it defaulted to mtNone anyway.
> 
> This trivial patch straightens the logic and uses `mtNone` as default. Note that since mtOther was ignored before, there is no behavioral change.

lgtm

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

Marked as reviewed by eastig at github.com (no known OpenJDK username).

PR: https://git.openjdk.org/jdk/pull/9287


More information about the hotspot-runtime-dev mailing list