Skip to content

3 slab iterator caches the bitmap word - #8

Merged
aotodev merged 3 commits into
masterfrom
3-slab-iterator-caches-the-bitmap-word
Sep 29, 2026
Merged

aotodev merged 3 commits into
masterfrom
3-slab-iterator-caches-the-bitmap-word

Conversation

@aotodev

@aotodev aotodev commented Sep 29, 2026

Copy link
Copy Markdown
Owner

The iterator copied the current bitmap word, so a block freed after the
iterator was built was still visited, and one allocated ahead of it was
skipped. pool::erase could then return end() with live elements left.

The iterator now holds a bit index and re-reads the bitmap on each
increment. begin(), operator++ and make_iterator share next_allocated().

Closes #3

@aotodev aotodev linked an issue Sep 29, 2026 that may be closed by this pull request
@aotodev aotodev self-assigned this Sep 29, 2026
@aotodev
aotodev merged commit d0edcff into master Sep 29, 2026
5 checks passed
@aotodev
aotodev deleted the 3-slab-iterator-caches-the-bitmap-word branch September 29, 2026 17:07
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.

slab: iterator caches the bitmap word

1 participant