RFR: JDK-8284178: os::commit_memory() should assert the given range [v3]

Aleksey Shipilev shade at openjdk.java.net
Thu Apr 7 18:00:19 UTC 2022


On Thu, 7 Apr 2022 17:56:45 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Trivial fix to assert that ranges given to os::commit/uncommit/release_memory are not empty.
>> 
>> 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, when it really was a reservation error. An assert would have saved me time.
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Aleksey feedback 2

Marked as reviewed by shade (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/8075


More information about the hotspot-runtime-dev mailing list