MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zmalloc_no_tcache

Function zmalloc_no_tcache

app/redis-6.2.6/src/zmalloc.c:142–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 * Currently implemented only for jemalloc. Used for online defragmentation. */
141#ifdef HAVE_DEFRAG
142void *zmalloc_no_tcache(size_t size) {
143 ASSERT_NO_SIZE_OVERFLOW(size);
144 void *ptr = mallocx(size+PREFIX_SIZE, MALLOCX_TCACHE_NONE);
145 if (!ptr) zmalloc_oom_handler(size);
146 update_zmalloc_stat_alloc(zmalloc_size(ptr));
147 return ptr;
148}
149
150void zfree_no_tcache(void *ptr) {
151 if (ptr == NULL) return;

Callers 1

activeDefragAllocFunction · 0.85

Calls 1

zmalloc_sizeFunction · 0.85

Tested by

no test coverage detected