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

Function operator new[]

tests/profile/json_memory_profile.cpp:237–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237void* operator new[](size_t size) {
238 void* ptr = ::malloc(size); // Explicitly call global malloc (our override)
239 if (!ptr) {
240 printf("FATAL: operator new[] failed to allocate %zu bytes\n", size);
241 abort();
242 }
243 return ptr;
244}
245
246void operator delete(void* ptr) noexcept {
247 ::free(ptr); // Explicitly call global free (our override)

Callers

nothing calls this directly

Calls 2

printfFunction · 0.85
mallocFunction · 0.70

Tested by

no test coverage detected