FastLED 3.9.15
Loading...
Searching...
No Matches

◆ slab_allocator_registry_set()

void fl::detail::slab_allocator_registry_set ( fl::size block_size,
fl::size slab_size,
void * allocator )

Definition at line 266 of file allocator.cpp.hpp.

266 {
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}

References fl::detail::anonymous_namespace{allocator.cpp.hpp}::SlabRegistryEntry::allocator.

Referenced by fl::allocator_slab< T, SLAB_SIZE >::get_allocator().

+ Here is the caller graph for this function: