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

NMT: reduce loads in os::malloc

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b25

      Two small improvements are possible related to how we handle the NMT level.

      We read the NMT level at every malloc; that is unavoidable. But we also read a second variable that shadows the NMT level `_nmt_was_initialized`. That state is synonymous with NMT level "unknown," so there is no need for this second load.

      Furthermore, NMT level is volatile. That had been necessary in older times since we used to shut down NMT on resource exhaustion. But since JDK-8256844, NMT level is fixed at initialization, so we can remove the volatile specifier.

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: