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

Method do_allocate

src/fl/stl/memory_resource.cpp.hpp:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23class DefaultMemoryResource : public memory_resource {
24 protected:
25 void* do_allocate(fl::size bytes) override {
26 void* p = fl::Malloc(bytes);
27 if (p) {
28 fl::memset(p, 0, bytes);
29 }
30 return p;
31 }
32
33 void do_deallocate(void* p, fl::size bytes) override {
34 FASTLED_UNUSED(bytes);

Callers

nothing calls this directly

Calls 2

MallocFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected