mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Periodically purge in memory-intensive integration tests.
This resolves #393.
This commit is contained in:
parent
2c53faf352
commit
eaecaad8ea
1 changed files with 7 additions and 0 deletions
|
|
@ -139,6 +139,13 @@ TEST_BEGIN(test_basic)
|
|||
rsz = sallocx(p, 0);
|
||||
assert_zu_eq(nsz, rsz, "nallocx()/sallocx() rsize mismatch");
|
||||
dallocx(p, 0);
|
||||
/*
|
||||
* 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 MAXSZ
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue