Cache-bin: Make flush modifications internal

I.e. the tcache code just calls a cache-bin function to finish flush (and move
pointers around, etc.).  It doesn't directly access the cache-bin's owned memory
any more.
This commit is contained in:
David Goldblatt
2020-02-29 10:48:59 -08:00
committed by David Goldblatt
parent ff6acc6ed5
commit 44529da852
2 changed files with 19 additions and 7 deletions

View File

@@ -346,12 +346,8 @@ tcache_bin_flush_impl(tsd_t *tsd, tcache_t *tcache, cache_bin_t *tbin,
}
}
memmove(tbin->cur_ptr.ptr + (ncached - rem), tbin->cur_ptr.ptr, rem *
sizeof(void *));
cache_bin_ncached_set(tbin, &tcache_bin_info[binind], rem);
if (tbin->cur_ptr.lowbits > tbin->low_water_position) {
tbin->low_water_position = tbin->cur_ptr.lowbits;
}
cache_bin_finish_flush(tbin, &tcache_bin_info[binind], &ptrs,
ncached - rem);
}
void