Skip to content

Commit 2dcc063

Browse files
committed
Fix OOM test for HOST ALL memspace
Add an access to each allocation so that pages are actually allocated on the selected NUMA nodes.
1 parent 40d919c commit 2dcc063

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/memspaces/memspace_host_all.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ TEST_F(memspaceHostAllProviderTest, memoryPolicyOOM) {
112112
break;
113113
}
114114

115+
// Allocate the necessary pages, by accessing the memory at 'ptr'.
116+
*static_cast<int *>(ptr) = 0xC0FFEE;
117+
115118
UT_ASSERTne(ptr, nullptr);
116119
allocs.push_back(ptr);
117120
}

0 commit comments

Comments
 (0)