#linked-list #slab #deque #queue #memory-management

slabigator

A linked list that doesn't do dynamic memory allocations

10 releases

0.9.2 Mar 17, 2024
0.9.1 Sep 8, 2023
0.2.0 Aug 9, 2022
0.1.6 Aug 9, 2022
0.1.4 Jun 30, 2022

#548 in Data structures

Download history 383/week @ 2024-01-20 263/week @ 2024-01-27 315/week @ 2024-02-03 263/week @ 2024-02-10 424/week @ 2024-02-17 518/week @ 2024-02-24 268/week @ 2024-03-02 391/week @ 2024-03-09 666/week @ 2024-03-16 187/week @ 2024-03-23 603/week @ 2024-03-30 180/week @ 2024-04-06 338/week @ 2024-04-13 254/week @ 2024-04-20 470/week @ 2024-04-27 223/week @ 2024-05-04

1,315 downloads per month
Used in 2 crates

MIT/Apache

19KB
451 lines

CI

Slabigator

A linked list that doesn't do dynamic memory allocations.

Things it was designed to do:

  • Add to the head of the list in O(1) - What you get back is a stable slot number
  • Pop from the tail of the list in O(1)
  • Delete an element given its slot number in O(1)
  • And nothing else.

Dumb, small, maintainable, zero dependencies.

Cargo features:

  • releasefast: assume that remove() will always be called with a valid index. This saves some memory, but has to be used with extreme caution. That feature is not set by default.
  • slot_u32: use u32 as the slot type (default)
  • slot_u64: use u64 as the slot type
  • slot_usize: use usize as the slot type

No runtime deps