#linked-list #deque #queue #allocation #slab #numbers

slabigator

A linked list that doesn't do dynamic memory allocations

11 releases

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

#353 in Data structures

Download history 60/week @ 2024-12-23 97/week @ 2024-12-30 414/week @ 2025-01-06 434/week @ 2025-01-13 408/week @ 2025-01-20 561/week @ 2025-01-27 525/week @ 2025-02-03 561/week @ 2025-02-10 416/week @ 2025-02-17 248/week @ 2025-02-24 418/week @ 2025-03-03 384/week @ 2025-03-10 269/week @ 2025-03-17 280/week @ 2025-03-24 291/week @ 2025-03-31 322/week @ 2025-04-07

1,167 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