summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/pthread_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp
index 46140bbc6..f342577a9 100755
--- a/tests/pthread_test.cpp
+++ b/tests/pthread_test.cpp
@@ -2117,8 +2117,9 @@ TEST(pthread, pthread_create__mmap_failures) {
const auto kPageSize = sysconf(_SC_PAGE_SIZE);
- // Use up all the VMAs. By default this is 64Ki.
+ // Use up all the VMAs. By default this is 64Ki (though some will already be in use).
std::vector<void*> pages;
+ pages.reserve(64 * 1024);
int prot = PROT_NONE;
while (true) {
void* page = mmap(nullptr, kPageSize, prot, MAP_ANON|MAP_PRIVATE, -1, 0);