Last revised: Jun 2025
core::SlabPool implements slab pool. (Actual implementation is in core::SlabPoolImpl).
When an object is allocated, there are two main paths:
- hot path - object is available in free list (src)
- cold path - freelist is empty, we need to grow the pool (src)
Currently, both paths runs under a mutex. Hot path uses a doubly linked-list of free slots.
We should update pool so that hot path will not use mutex, and will use lock-free freelist instead.
This is important to prevent priority inversion problems, because shared pools are used by both realtime and non-realtime threads.
core::FreeList was added in #734.
Last revised: Jun 2025
core::SlabPool implements slab pool. (Actual implementation is in core::SlabPoolImpl).
When an object is allocated, there are two main paths:
Currently, both paths runs under a mutex. Hot path uses a doubly linked-list of free slots.
We should update pool so that hot path will not use mutex, and will use lock-free freelist instead.
This is important to prevent priority inversion problems, because shared pools are used by both realtime and non-realtime threads.
core::FreeList was added in #734.