MCPcopy Create free account
hub / github.com/Shangyizhou/A-Tiny-Network-Library / calloc

Method calloc

src/memory/MemoryPool.cc:183–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182
183void* MemoryPool::calloc(unsigned long size)
184{
185 void* addr = malloc(size);
186 if (addr != nullptr)
187 {
188 memset(addr, 0, size);
189 }
190 return addr;
191}
192
193void MemoryPool::freeMemory(void* p)
194{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected