Skip to content

multislab: O(1) deallocation through an iterator - #10

Merged
aotodev merged 1 commit into
masterfrom
5-poolmultislab-erase-is-os
Sep 29, 2026
Merged

aotodev merged 1 commit into
masterfrom
5-poolmultislab-erase-is-os

Conversation

@aotodev

@aotodev aotodev commented Sep 29, 2026

Copy link
Copy Markdown
Owner

pool::erase held the node in its iterator but freed by pointer, paying
find_owner's scan over every slab. multislab::deallocate(iterator) frees
by node and bit index; pool::erase and the emplace rollback use it.
slab gains deallocate_at(index), index_of(ptr) and iterator::index().

Erase at 10k slabs: 8.8 us -> 20 ns.

Closes #5

@aotodev aotodev linked an issue Sep 29, 2026 that may be closed by this pull request
@aotodev
aotodev merged commit cac213f into master Sep 29, 2026
5 checks passed
@aotodev
aotodev deleted the 5-poolmultislab-erase-is-os branch September 29, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pool/multislab: erase is O(S)

1 participant