hawkw / sharded-slab

a lock-free concurrent slab (experimental)
MIT License
273 stars 19 forks source link

fix: `remove` not adding slots to free lists #18

Closed hawkw closed 4 years ago

hawkw commented 4 years ago

This fixes an issue where, when a slot is freed immediately by a call to remove while uncontended, it was not added to the page's free list, and thus never reused. This resulted in a memory leak.

I've also refactored some internals.

Signed-off-by: Eliza Weisman eliza@buoyant.io