mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-20 17:31:16 +03:00
Fix test_stats_arenas_summary fragility.
Fix test_stats_arenas_summary to deallocate before asserting that purging must have happened.
This commit is contained in:
parent
b24f74b862
commit
49931bd8ff
1 changed files with 4 additions and 4 deletions
|
|
@ -93,6 +93,10 @@ TEST_BEGIN(test_stats_arenas_summary)
|
|||
huge = mallocx(chunksize, 0);
|
||||
assert_ptr_not_null(huge, "Unexpected mallocx() failure");
|
||||
|
||||
dallocx(little, 0);
|
||||
dallocx(large, 0);
|
||||
dallocx(huge, 0);
|
||||
|
||||
assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0,
|
||||
"Unexpected mallctl() failure");
|
||||
|
||||
|
|
@ -116,10 +120,6 @@ TEST_BEGIN(test_stats_arenas_summary)
|
|||
assert_u64_le(nmadvise, purged,
|
||||
"nmadvise should be no greater than purged");
|
||||
}
|
||||
|
||||
dallocx(little, 0);
|
||||
dallocx(large, 0);
|
||||
dallocx(huge, 0);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue