slice-arena 1.0.0

Store lots of tiny slices with low overhead, in contiguous blocks of memory
Documentation
  • Coverage
  • 87.5%
    7 out of 8 items documented0 out of 7 items with examples
  • Size
  • Source code size: 6.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.31 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kornelski

Memory pool for slices and paths

SliceArena can store any number of slices, string slices or paths with minimal overhead even for very short slices.

It allocates contiguous blocks of memory, and frees them all at once when it's dropped.

It's a faster and more efficient option than Box<str>, Rc<String>, etc.

Note that you can't hold an owned SliceArena object in the same struct as slices from the arena, due to borrow checker's "self-referential struct" limitation. Make your constructors take an arena as an argument, by reference.