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

Function slab_allocator_registry_get

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

Source from the content-addressed store, hash-verified

254} // anonymous namespace
255
256void* slab_allocator_registry_get(fl::size block_size, fl::size slab_size) {
257 for (int i = 0; i < slab_registry_count; i++) {
258 if (slab_registry[i].block_size == block_size &&
259 slab_registry[i].slab_size == slab_size) {
260 return slab_registry[i].allocator;
261 }
262 }
263 return nullptr;
264}
265
266void slab_allocator_registry_set(fl::size block_size, fl::size slab_size, void* allocator) {
267 // Check if already registered (update)

Callers 1

allocator_slabClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected