FastLED 3.10.8
Loading...
Searching...
No Matches

◆ calloc()

void * fl::libc_impl::calloc ( size_t nmemb,
size_t size )

Definition at line 18 of file malloc.cpp.hpp.

18 {
19 size_t total_size = nmemb * size;
20 void* ptr = malloc(total_size);
21 if (ptr != nullptr) {
22 memset(ptr, 0, total_size);
23 }
24 return ptr;
25 }
void * memset(void *s, int c, size_t n) FL_NO_EXCEPT
void * malloc(size_t size) FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, fl::malloc(), and fl::memset().

Referenced by fl::calloc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: