MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / Calloc

Function Calloc

system/lib/compiler-rt/lib/lsan/lsan_allocator.cpp:115–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static void *Calloc(uptr nmemb, uptr size, const StackTrace &stack) {
116 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) {
117 if (AllocatorMayReturnNull())
118 return nullptr;
119 ReportCallocOverflow(nmemb, size, &stack);
120 }
121 size *= nmemb;
122 return Allocate(stack, size, 1, true);
123}
124
125void Deallocate(void *p) {
126 RegisterDeallocation(p);

Callers 1

lsan_callocFunction · 0.85

Calls 4

CheckForCallocOverflowFunction · 0.85
AllocatorMayReturnNullFunction · 0.85
AllocateFunction · 0.85
ReportCallocOverflowFunction · 0.50

Tested by

no test coverage detected