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

Function PSRamAllocate

src/fl/stl/allocator.cpp.hpp:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void *PSRamAllocate(fl::size size, bool zero) {
120
121 void *ptr = Alloc(size);
122 if (ptr && zero) {
123 fl::memset(ptr, 0, size);
124 }
125
126#if defined(FASTLED_TESTING)
127 if (gMallocFreeHook && ptr) {
128 MemoryGuard allows_hook;
129 if (allows_hook.enabled()) {
130 gMallocFreeHook->onMalloc(ptr, size);
131 }
132 }
133#endif
134
135 return ptr;
136}
137
138void PSRamDeallocate(void *ptr) {
139#if defined(FASTLED_TESTING)

Callers 3

AllocMethod · 0.85
do_allocateMethod · 0.85
FL_TEST_FILEFunction · 0.85

Calls 3

memsetFunction · 0.85
enabledMethod · 0.80
onMallocMethod · 0.45

Tested by

no test coverage detected