os::commit_memory() should assert the given range

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 19
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: