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

Function zmalloc_no_tcache

src/zmalloc.cpp:154–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 * Currently implemented only for jemalloc. Used for online defragmentation. */
153#ifdef HAVE_DEFRAG
154void *zmalloc_no_tcache(size_t size) {
155 ASSERT_NO_SIZE_OVERFLOW(size);
156 void *ptr = mallocx(size+PREFIX_SIZE, MALLOCX_TCACHE_NONE);
157 if (!ptr) zmalloc_oom_handler(size);
158 update_zmalloc_stat_alloc(zmalloc_size(ptr));
159 return ptr;
160}
161
162void zfree_no_tcache(void *ptr) {
163 if (ptr == NULL) return;

Callers 1

activeDefragAllocFunction · 0.85

Calls 1

zmalloc_sizeFunction · 0.85

Tested by

no test coverage detected