Skip to content

multislab: separate iteration order from free-space lists - #9

Merged
aotodev merged 1 commit into
masterfrom
4-multislab-iteration-and-free-space-tracking-share-one-list
Sep 29, 2026
Merged

aotodev merged 1 commit into
masterfrom
4-multislab-iteration-and-free-space-tracking-share-one-list

Conversation

@aotodev

@aotodev aotodev commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Iteration shared next/prev with the active/full lists, so moving a slab
between them sent live iterators into the wrong list: elements skipped
or visited twice, and a use-after-free once the captured full-list head
was released. Allocation also grew while slabs below the active head had
free slots, failing spuriously at a slab cap.

Each node now has a second link pair, relinked only on grow and free,
which the iterator follows. Slabs move to the full list on the
allocation that fills them, so every active slab has a free slot.

Closes #4

@aotodev aotodev self-assigned this Sep 29, 2026
@aotodev aotodev linked an issue Sep 29, 2026 that may be closed by this pull request
@aotodev
aotodev merged commit a021600 into master Sep 29, 2026
5 checks passed
@aotodev
aotodev deleted the 4-multislab-iteration-and-free-space-tracking-share-one-list branch September 29, 2026 17:58
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.

multislab: iteration and free-space tracking share one list

1 participant