Skip to content
Permalink
Browse files
8262952: [macos_aarch64] os::commit_memory failure
Reviewed-by: stuefe, aph
  • Loading branch information
Gerard Ziemski committed May 18, 2021
1 parent f8f40ab commit fadf58043c10e4fd98dfdb35256f5efc6d3cd366
Showing with 2 additions and 6 deletions.
  1. +2 −6 test/hotspot/gtest/runtime/test_os.cpp
@@ -368,11 +368,11 @@ static address reserve_multiple(int num_stripes, size_t stripe_len) {
// ... re-reserve in the same spot multiple areas...
for (int stripe = 0; stripe < num_stripes; stripe++) {
address q = p + (stripe * stripe_len);
q = (address)os::attempt_reserve_memory_at((char*)q, stripe_len);
EXPECT_NE(q, (address)NULL);
// Commit, alternatingly with or without exec permission,
// to prevent kernel from folding these mappings.
const bool executable = stripe % 2 == 0;
q = (address)os::attempt_reserve_memory_at((char*)q, stripe_len, executable);
EXPECT_NE(q, (address)NULL);
EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, executable));
}
return p;
@@ -412,11 +412,7 @@ struct NUMASwitcher {
#endif

#ifndef _AIX // JDK-8257041
#if defined(__APPLE__) && defined(AARCH64)
TEST_VM(os, DISABLED_release_multi_mappings) {
#else
TEST_VM(os, release_multi_mappings) {
#endif
// Test that we can release an area created with multiple reservation calls
const size_t stripe_len = 4 * M;
const int num_stripes = 4;

1 comment on commit fadf580

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on fadf580 May 18, 2021

Please sign in to comment.