Skip to content
Closed
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/hotspot/gtest/gc/g1/test_freeRegionList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ TEST_OTHER_VM(G1FreeRegionList, length) {

// Create a fake heap. It does not need to be valid, as the G1HeapRegion constructor
// does not access it.
MemRegion heap(nullptr, num_regions_in_test * G1HeapRegion::GrainWords);
HeapWord val{};
HeapWord* ptr = align_up(&val, os::vm_page_size());

MemRegion heap(ptr, num_regions_in_test * G1HeapRegion::GrainWords);

// Allocate a fake BOT because the G1HeapRegion constructor initializes
// the BOT.
Expand Down