MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / bin_init

Function bin_init

deps/jemalloc/src/bin.c:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67bool
68bin_init(bin_t *bin) {
69 if (malloc_mutex_init(&bin->lock, "bin", WITNESS_RANK_BIN,
70 malloc_mutex_rank_exclusive)) {
71 return true;
72 }
73 bin->slabcur = NULL;
74 extent_heap_new(&bin->slabs_nonfull);
75 extent_list_init(&bin->slabs_full);
76 if (config_stats) {
77 memset(&bin->stats, 0, sizeof(bin_stats_t));
78 }
79 return false;
80}
81
82void
83bin_prefork(tsdn_t *tsdn, bin_t *bin) {

Callers 1

arena_newFunction · 0.85

Calls 2

malloc_mutex_initFunction · 0.70
extent_list_initFunction · 0.50

Tested by

no test coverage detected