mjansson/rpmalloc

_rpmalloc_span_extract_free_list_deferred is not lock-free

marcinwrochna opened this issue · 1 comments

The loop in _rpmalloc_deallocate_defer_small_or_medium and _rpmalloc_span_extract_free_list_deferred is a spin-lock as far as I understand. Any thread that's de-scheduled there (before free_list_deferred is restored) will block all other threads executing those functions indefinitely.

That is true, and I changed that in the upcoming rewrite which I plan to release soon, where it is (in the allocation/free paths) proper lock free with guaranteed thread progress.

See https://github.com/mjansson/rpmalloc/tree/mjansson/rewrite branch for now