Cache bin: Add a debug method for init checking.

This commit is contained in:
David Goldblatt 2020-03-02 18:07:19 -08:00 committed by David Goldblatt
parent 370c1ea007
commit 6a7aa46ef7
3 changed files with 14 additions and 2 deletions

View file

@ -354,4 +354,11 @@ void cache_bin_postincrement(cache_bin_info_t *infos, szind_t ninfos,
void cache_bin_init(cache_bin_t *bin, cache_bin_info_t *info, void *alloc,
size_t *cur_offset);
/*
* If a cache bin was zero initialized (either because it lives in static or
* thread-local storage, or was memset to 0), this function indicates whether or
* not cache_bin_init was called on it.
*/
bool cache_bin_still_zero_initialized(cache_bin_t *bin);
#endif /* JEMALLOC_INTERNAL_CACHE_BIN_H */