#linked-list #slab #deque #queue #allocation #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

#666 in Data structures

Download history 617/week @ 2024-08-26 318/week @ 2024-09-02 602/week @ 2024-09-09 855/week @ 2024-09-16 500/week @ 2024-09-23 669/week @ 2024-09-30 454/week @ 2024-10-07 122/week @ 2024-10-14 343/week @ 2024-10-21 347/week @ 2024-10-28 181/week @ 2024-11-04 91/week @ 2024-11-11 68/week @ 2024-11-18 49/week @ 2024-11-25 260/week @ 2024-12-02 237/week @ 2024-12-09

617 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