#heap #dynamic #pointers #store #object #containing #fields

nightly compact

Store objects containing dynamic fields either compactly in consecutive memory or using traditional heap pointers

18 releases

Uses old Rust 2015

0.2.16 Aug 25, 2020
0.2.15 Jul 9, 2019
0.2.13 Sep 26, 2018
0.2.7 Aug 12, 2018
0.1.0 Jul 5, 2018

#541 in Memory management

Download history 3/week @ 2024-02-12 7/week @ 2024-02-19 48/week @ 2024-02-26 10/week @ 2024-03-04 12/week @ 2024-03-11

78 downloads per month
Used in 3 crates

MIT license

79KB
2K SLoC

This crate makes it possible to store objects containing dynamic fields either compactly in consecutive memory or using traditional heap pointers.

Bread-and-butter datastructures are offered, they feature:

  • transparent access semantics, independent of currently used storage
  • automatic spill from exhausted compact storage to heap storage
  • recursive re-compaction

This is used in Kay for:

  • Storing actor state compactly in one place for cache coherency and easy persistence
  • Sending complex, dynamically-sized messages over boundaries such as actors, threads and the network

Dependencies

~1MB
~19K SLoC