mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-02 03:47:26 +03:00
Cache bin: Add an emptiness assertion.
This commit is contained in:
parent
6a7aa46ef7
commit
d498a4bb08
2 changed files with 8 additions and 3 deletions
|
|
@ -566,9 +566,7 @@ tcache_destroy(tsd_t *tsd, tcache_t *tcache, bool tsd_tcache) {
|
|||
if (tsd_tcache) {
|
||||
/* Release the avail array for the TSD embedded auto tcache. */
|
||||
cache_bin_t *bin = tcache_small_bin_get(tcache, 0);
|
||||
assert(cache_bin_ncached_get(bin, &tcache_bin_info[0]) == 0);
|
||||
assert(cache_bin_empty_position_get(bin, &tcache_bin_info[0]) ==
|
||||
bin->cur_ptr.ptr);
|
||||
cache_bin_assert_empty(bin, &tcache_bin_info[0]);
|
||||
void *avail_array = (void *)((uintptr_t)bin->cur_ptr.ptr -
|
||||
tcache_bin_info[0].stack_size);
|
||||
idalloctm(tsd_tsdn(tsd), avail_array, NULL, NULL, true, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue