MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_default_calloc

Function acl_default_calloc

lib_acl/src/stdlib/memory/acl_default_malloc.c:401–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399#endif /* !SAFE_MEM */
400
401void *acl_default_calloc(const char *filename, int line,
402 size_t nmemb, size_t size)
403{
404 void *ptr;
405 int n;
406
407#ifdef DEBUG_MEM
408 __ncalloc++;
409 //printf("calloc: %llu, file=%s, line=%d\r\n", __ncalloc, filename, line);
410#endif
411 n = (int) (nmemb * size);
412 ptr = acl_default_malloc(filename, line, n);
413 acl_assert(ptr);
414 memset(ptr, FILLER, n);
415 return ptr;
416}
417
418/* acl_default_strdup - save string to heap */
419

Callers 6

allocator_allocFunction · 0.85
mem_slice_createFunction · 0.85
memPoolCreateFunction · 0.85
acl_stack_createFunction · 0.85
fifo_newFunction · 0.85
acl_pthread_createFunction · 0.85

Calls 1

acl_default_mallocFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…