MCPcopy Create free account
hub / github.com/FastLED/FastLED / calloc

Function calloc

src/fl/stl/malloc.cpp.hpp:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 }
16
17 void* calloc(size_t nmemb, size_t size) {
18 size_t total_size = nmemb * size;
19 void* ptr = malloc(total_size);
20 if (ptr != nullptr) {
21 memset(ptr, 0, total_size);
22 }
23 return ptr;
24 }
25
26 void* realloc(void* ptr, size_t new_size) {
27 return ::realloc(ptr, new_size);

Callers

nothing calls this directly

Calls 2

memsetFunction · 0.85
mallocFunction · 0.70

Tested by

no test coverage detected