Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8334403

Unify behavior of os::committed_in_range across OSes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 24
    • hotspot

      os::committed_in_range

      - on linux and (since JDK-8332362) macos, it returns live memory
      - on windows, it returns committed memory
      - on AIX, it returns the full range

      The intended behavior (since its mainly used for NMT thread stacks) is to return live memory.

      The Windows issue is caused by evaluating MEM_COMMIT instead of MEM_MAPPED. Switching to MEM_MAPPED may solve the problem.

      The AIX issue stems from the fact that mincore(2) does not work correctly on AIX if the underlying memory was not mmaped. The AIX issue cannot easily be solved, at least not for the intended use of measuring live memory in thread stacks.

      In addition, committed_in_range is a misleading name. Something like "live_in_range" would be more correct.

            rtoyonaga Robert Toyonaga
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: