Periodically purge in memory-intensive integration tests.

This resolves #393.
This commit is contained in:
Jason Evans
2016-10-28 10:44:39 -07:00
parent 68e14c9884
commit 963289df13
3 changed files with 27 additions and 6 deletions

View File

@@ -196,6 +196,13 @@ TEST_BEGIN(test_alignment_and_size)
}
}
}
/*
* On systems which can't merge extents, this test generates a
* lot of dirty memory very quickly. Purge between cycles to
* avoid potential OOM on e.g. 32-bit Windows.
*/
assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0,
"Unexpected mallctl error");
}
#undef MAXALIGN
#undef NITER