Skip to content

Commit

Permalink
adding some missing checks and re calculation of decided size
Browse files Browse the repository at this point in the history
  • Loading branch information
singhnitin authored and singhnitin committed Aug 12, 2024
1 parent 7322c0f commit 26422ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/hotspot/gtest/runtime/test_os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ TEST_VM(os_windows, large_page_init_decide_size) {
if (!is_supported_windows_version) {
FLAG_SET_CMDLINE(LargePageSizeInBytes, 5 * M); // Set large page size to 5MB
if (!EnableAllLargePageSizesForWindows) {
decided_size = os::win32::large_page_init_decide_size(); // Recalculate decided size
EXPECT_EQ(decided_size, 0) << "Expected decided size to be 0 for large pages bigger than 4mb on IA32 or AMD64";
}
}
Expand All @@ -837,7 +838,9 @@ TEST_VM(os_windows, large_page_init_decide_size) {

// Assert that the decided size defaults to minimum page size when LargePageSizeInBytes
// is not a multiple of the minimum size, assuming conditions are always met
EXPECT_EQ(decided_size, min_size) << "Expected decided size to default to minimum large page size when LargePageSizeInBytes is not a multiple of minimum size";
if(is_supported_windows_version) {
EXPECT_EQ(decided_size, min_size) << "Expected decided size to default to minimum large page size when LargePageSizeInBytes is not a multiple of minimum size";
}
}

class ReserveMemorySpecialRunnable : public TestRunnable {
Expand Down

0 comments on commit 26422ab

Please sign in to comment.