RFR: 8353564: Fail fatally if os::release_memory or os::uncommit_memory fails [v5]
Robert Toyonaga
duke at openjdk.org
Thu Jan 29 17:50:54 UTC 2026
On Thu, 29 Jan 2026 07:56:06 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Robert Toyonaga has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Don't pass false, rely on default argument. Punctuation. Whitespace.
>
> test/hotspot/gtest/runtime/test_os.cpp line 667:
>
>> 665: char* p = setup_release_test_memory();
>> 666: os::release_memory(p, M); // Release part of the range
>> 667: }
>
> This is a good rewrite of the tests. I did not even think of this.
>
> Proposal: do this:
>
>
> #ifdef ASSERT
> #define TEST_RELEASE_RANGE_ERROR(name) TEST_VM_ASSERT_MSG(os, name, ".*bad release")
> #else
> #define TEST_RELEASE_RANGE_ERROR(name) TEST_VM_FATAL_ERROR_MSG(os, name, ".*Failed to release.*")
> #endif
>
>
> and use TEST_RELEASE_RANGE_ERROR as header, saves duplicating these lines five times.
That's a good idea! I've adopted it and pushed a new commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29240#discussion_r2742806170
More information about the hotspot-dev
mailing list