diff --git a/src/hotspot/os/aix/globals_aix.hpp b/src/hotspot/os/aix/globals_aix.hpp index fb353348a53..6904bf9dc45 100644 --- a/src/hotspot/os/aix/globals_aix.hpp +++ b/src/hotspot/os/aix/globals_aix.hpp @@ -66,12 +66,6 @@ product(bool, Use64KPages, true, \ "Use 64K pages if available.") \ \ - /* If VM uses 64K paged memory (shmat) for virtual memory: threshold below */ \ - /* which virtual memory allocations are done with 4K memory (mmap). This is */ \ - /* mainly for test purposes. */ \ - develop(uintx, Use64KPagesThreshold, 0, \ - "4K/64K page allocation threshold.") \ - \ /* Normally AIX commits memory on touch, but sometimes it is helpful to have */ \ /* explicit commit behaviour. This flag, if true, causes the VM to touch */ \ /* memory on os::commit_memory() (which normally is a noop). */ \ diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index 38f8333e8ed..4885675a6a1 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1970,11 +1970,7 @@ char* os::pd_reserve_memory(size_t bytes, bool exec) { if (os::vm_page_size() == 4*K) { return reserve_mmaped_memory(bytes, nullptr /* requested_addr */); } else { - if (bytes >= Use64KPagesThreshold) { - return reserve_shmated_memory(bytes, nullptr /* requested_addr */); - } else { - return reserve_mmaped_memory(bytes, nullptr /* requested_addr */); - } + return reserve_shmated_memory(bytes, nullptr /* requested_addr */); } } @@ -2183,11 +2179,7 @@ char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, bool if (os::vm_page_size() == 4*K) { return reserve_mmaped_memory(bytes, requested_addr); } else { - if (bytes >= Use64KPagesThreshold) { - return reserve_shmated_memory(bytes, requested_addr); - } else { - return reserve_mmaped_memory(bytes, requested_addr); - } + return reserve_shmated_memory(bytes, requested_addr); } return addr; diff --git a/test/hotspot/gtest/runtime/test_os.cpp b/test/hotspot/gtest/runtime/test_os.cpp index 990845c1ce7..55d30349ee5 100644 --- a/test/hotspot/gtest/runtime/test_os.cpp +++ b/test/hotspot/gtest/runtime/test_os.cpp @@ -957,7 +957,7 @@ TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_largepages) { #ifdef AIX // On Aix, we should fail attach attempts not aligned to segment boundaries (256m) TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address) { - if (Use64KPages && Use64KPagesThreshold == 0) { + if (Use64KPages) { char* p = os::attempt_reserve_memory_at((char*)0x1f00000, M); ASSERT_EQ(p, nullptr); // should have failed p = os::attempt_reserve_memory_at((char*)((64 * G) + M), M);