MCPcopy Create free account
hub / github.com/FastLED/FastLED / operator new

Function operator new

tests/profile/json_memory_profile.cpp:228–235  ·  view source on GitHub ↗

Operator new/delete overrides

Source from the content-addressed store, hash-verified

226
227// Operator new/delete overrides
228void* operator new(size_t size) {
229 void* ptr = ::malloc(size); // Explicitly call global malloc (our override)
230 if (!ptr) {
231 printf("FATAL: operator new failed to allocate %zu bytes\n", size);
232 abort();
233 }
234 return ptr;
235}
236
237void* operator new[](size_t size) {
238 void* ptr = ::malloc(size); // Explicitly call global malloc (our override)

Callers

nothing calls this directly

Calls 2

printfFunction · 0.85
mallocFunction · 0.70

Tested by

no test coverage detected