MCPcopy Create free account
hub / github.com/GJDuck/e9patch / calloc_impl

Function calloc_impl

examples/stdlib.c:2299–2307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2297}
2298
2299static void *calloc_impl(struct malloc_pool_s *pool, size_t nmemb,
2300 size_t size, bool lock)
2301{
2302 void *ptr = malloc_impl(pool, nmemb * size, lock);
2303 if (ptr == NULL || ptr == MA_ZERO)
2304 return ptr;
2305 memset(ptr, 0, nmemb * size);
2306 return ptr;
2307}
2308
2309static void *realloc_impl(struct malloc_pool_s *pool, void *ptr, size_t size,
2310 bool lock)

Callers 3

callocFunction · 0.85
calloc_unlockedFunction · 0.85
pool_callocFunction · 0.85

Calls 2

malloc_implFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected