FastLED 3.10.8
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 285 of file allocator.cpp.hpp.

285 {
286 auto& s = slab_registry_state();
287 // Check if already registered (update)
288 for (int i = 0; i < s.count; i++) {
289 if (s.entries[i].block_size == block_size &&
290 s.entries[i].slab_size == slab_size) {
291 s.entries[i].allocator = allocator;
292 return;
293 }
294 }
295 // Add new entry
296 if (s.count < SlabRegistryState::MAX) {
297 s.entries[s.count++] = {block_size, slab_size, allocator};
298 }
299}

References fl::FL_NO_EXCEPT.

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

+ Here is the caller graph for this function: