mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-26 13:55:40 +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
|
|
@ -146,6 +146,13 @@ cache_bin_empty_position_get(cache_bin_t *bin, cache_bin_info_t *info) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
cache_bin_assert_empty(cache_bin_t *bin, cache_bin_info_t *info) {
|
||||
assert(cache_bin_ncached_get(bin, info) == 0);
|
||||
assert(cache_bin_empty_position_get(bin, info) == bin->cur_ptr.ptr);
|
||||
}
|
||||
|
||||
|
||||
/* Returns the numeric value of low water in [0, ncached]. */
|
||||
static inline cache_bin_sz_t
|
||||
cache_bin_low_water_get(cache_bin_t *bin, cache_bin_info_t *info) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue