hawkw / sharded-slab

a lock-free concurrent slab (experimental)
MIT License
269 stars 17 forks source link

investigate using mmap for shard storage #35

Open hawkw opened 4 years ago

hawkw commented 4 years ago

we should look into replacing the vector of pages with a growable mmaped region. then, when we need more pages, rather than hitting malloc to make a big vec, we can increase the size of the mem map. growing a shard could potentially be much faster.

the downside is that this inherently means a bunch more unsafe code. it could be feature-flagged, but i'm not sure if it would be worth maintaining 2 impls.