Provide os::vm_max_address()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: hotspot

      We already have os::vm_min_address(), (introduced as part of JDK-8312018), which returns the system-specific (and sometimes configurable) minimum address of user-mappable memory.

      It would be good to have an "os::vm_max_address" counterpart to know the highest address one can obtain. I have needed this on several occasions, instead reverted to hard-coding some "reasonable max" values e.g. in os::attempt_reserve_memory_between, and in gtests. But *knowing* that value would be nicer.

      I believe ZGC already does something like this. Maybe the ZGC solution can just be uplifted as a general utility function.

            Assignee:
            Simon Tooke
            Reporter:
            Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: