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:
committed by
David Goldblatt
parent
ff6acc6ed5
commit
44529da852
@@ -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
|
||||
|
Reference in New Issue
Block a user