mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-16 15:41:41 +03:00
Fix assertions in arena_purge().
Fix assertions in arena_purge() to accurately reflect the constraints in arena_maybe_purge(). There were two bugs here, one of which merely weakened the assertion, and the other of which referred to an uninitialized variable (typo; used npurgatory instead of arena->npurgatory).
This commit is contained in:
parent
f0b22cf932
commit
f9a8edbb50
1 changed files with 2 additions and 2 deletions
|
|
@ -869,9 +869,9 @@ arena_purge(arena_t *arena, bool all)
|
|||
assert(ndirty == arena->ndirty);
|
||||
#endif
|
||||
assert(arena->ndirty > arena->npurgatory || all);
|
||||
assert(arena->ndirty > chunk_npages || all);
|
||||
assert(arena->ndirty - arena->npurgatory > chunk_npages || all);
|
||||
assert((arena->nactive >> opt_lg_dirty_mult) < (arena->ndirty -
|
||||
npurgatory) || all);
|
||||
arena->npurgatory) || all);
|
||||
|
||||
#ifdef JEMALLOC_STATS
|
||||
arena->stats.npurge++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue