< prev index next >

test/hotspot/gtest/runtime/test_os.cpp

Print this page

958 // On Aix, we should fail attach attempts not aligned to segment boundaries (256m)
959 TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address) {
960   if (Use64KPages) {
961     char* p = os::attempt_reserve_memory_at((char*)0x1f00000, M);
962     ASSERT_EQ(p, nullptr); // should have failed
963     p = os::attempt_reserve_memory_at((char*)((64 * G) + M), M);
964     ASSERT_EQ(p, nullptr); // should have failed
965   }
966 }
967 #endif // AIX
968 
969 TEST_VM(os, vm_min_address) {
970   size_t s = os::vm_min_address();
971   ASSERT_GE(s, M);
972   // Test upper limit. On Linux, its adjustable, so we just test for absurd values to prevent errors
973   // with high vm.mmap_min_addr settings.
974 #if defined(_LP64)
975   ASSERT_LE(s, NOT_LINUX(G * 4) LINUX_ONLY(G * 1024));
976 #endif
977 }
978 

958 // On Aix, we should fail attach attempts not aligned to segment boundaries (256m)
959 TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address) {
960   if (Use64KPages) {
961     char* p = os::attempt_reserve_memory_at((char*)0x1f00000, M);
962     ASSERT_EQ(p, nullptr); // should have failed
963     p = os::attempt_reserve_memory_at((char*)((64 * G) + M), M);
964     ASSERT_EQ(p, nullptr); // should have failed
965   }
966 }
967 #endif // AIX
968 
969 TEST_VM(os, vm_min_address) {
970   size_t s = os::vm_min_address();
971   ASSERT_GE(s, M);
972   // Test upper limit. On Linux, its adjustable, so we just test for absurd values to prevent errors
973   // with high vm.mmap_min_addr settings.
974 #if defined(_LP64)
975   ASSERT_LE(s, NOT_LINUX(G * 4) LINUX_ONLY(G * 1024));
976 #endif
977 }

< prev index next >