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

os::commit_memory() should assert the given range

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • hotspot
    • b18

      I recently hunted an error where the memory reservation failed, was not handled, and the null pointer was accidentally passed to os::commit_memory(). The resulting mmap() failed and this looked like a commit error at first glance, when it really was a reservation error.

      It would be good if os::commit_memory() would assert the given pointer != NULL and the range length > 0. While we are on it, release_memory has the same problem.

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

              Created:
              Updated:
              Resolved: