Registry / utility / sharded-slab

sharded-slab

JSON →
library0.1.7rscratesunverified

A lock-free concurrent slab allocator for storing and accessing data across threads.

# Cargo.toml [dependencies] sharded-slab = "0.1.7"
INSTALL
IMPORT
SIG · SHARDED-SLAB
S
sharded-slab
utilityrustv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Slab
use sharded_slab::Slab;

Insert and retrieve a value from a concurrent slab.

use sharded_slab::Slab; fn main() { let slab = Slab::new(); let key = slab.insert("hello").unwrap(); if let Some(val) = slab.get(key) { println!("Value: {}", val); } }
Debug
Known issues
gotchaThe slab does not automatically reclaim memory for removed entries; keys may be reused but memory is not freed until the slab is dropped.
fix
Use Slab::shrink_to_fit or recreate the slab if memory usage is a concern.
affects: *
Upgrade
Version history
0.1.7latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
sharded-slab — cargo add sharded-slab · libregistry