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

Afshin Zafari azafari at openjdk.org
Wed Apr 24 11:38:37 UTC 2024


On Wed, 24 Apr 2024 10:23:21 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> `archive_space_rs` and `class_space_rs` pass the MEMFLAGS to the `ReservedSpace` ctors a few lines above at 1272, 1319 and 1321.
>
> Yes I see the flags being passed to `ReservedSpace` but I don't see where `ReservedSpace` then calls `record_virtual_memory_type`.

The `flag` is passed down in the call chain of `ReservedSpace ctor` -> `initialize()` -> `reserve()` -> `reserve_memory()` -> `os::xxx_reserve_memory_yyy()` where is passed to `MemTracker`. There will be no need to specifically call `MemTracker::record_virtual_memory_type(..., flag)` since the flag is already sent to `MemTracker` when  reserving the region.

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

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


More information about the shenandoah-dev mailing list