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

Function slab_allocator_registry_set

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

Source from the content-addressed store, hash-verified

264}
265
266void slab_allocator_registry_set(fl::size block_size, fl::size slab_size, void* allocator) {
267 // Check if already registered (update)
268 for (int i = 0; i < slab_registry_count; i++) {
269 if (slab_registry[i].block_size == block_size &&
270 slab_registry[i].slab_size == slab_size) {
271 slab_registry[i].allocator = allocator;
272 return;
273 }
274 }
275 // Add new entry
276 if (slab_registry_count < SLAB_REGISTRY_MAX) {
277 slab_registry[slab_registry_count++] = {block_size, slab_size, allocator};
278 }
279}
280
281} // namespace detail
282

Callers 1

allocator_slabClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected