Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Made pool reuse a queue #612

Merged
merged 3 commits into from
Apr 26, 2023
Merged

Made pool reuse a queue #612

merged 3 commits into from
Apr 26, 2023

Conversation

mjp41
Copy link
Member

@mjp41 mjp41 commented Apr 25, 2023

So allocator churn will cause remote queues to be visited.

Copy link
Contributor

@nwf-msr nwf-msr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits, but it sounds like a good plan to me.

PoolState<T>& pool = get_state();
last->next = nullptr;
FlagLock f(pool.lock);
// Pushes a linked list of objects onto the stack. Used to put a linked
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably just drop this comment, given the doxygen comment on the method?

mjp41 added 2 commits April 26, 2023 10:03
So allocator churn will cause remote queues to be visited.
@mjp41 mjp41 force-pushed the allocator_queue branch from deb7737 to 2f1b9c7 Compare April 26, 2023 09:04
@mjp41 mjp41 merged commit 7b3a2b3 into microsoft:main Apr 26, 2023
@mjp41 mjp41 deleted the allocator_queue branch April 26, 2023 14:08
mjp41 added a commit to mjp41/snmalloc that referenced this pull request Apr 10, 2025
The pool sort routine is used by Verona's systematic testing.  There was a bug introduced in microsoft#612 that could corrupt the list when a sort occured.

This is not used by snmalloc and the test coverage was insufficient to expose the bug.

This PR fixes the bug, and improves test coverage.
@mjp41 mjp41 mentioned this pull request Apr 10, 2025
mjp41 added a commit that referenced this pull request Apr 10, 2025
The pool sort routine is used by Verona's systematic testing.  There was a bug introduced in #612 that could corrupt the list when a sort occured.

This is not used by snmalloc and the test coverage was insufficient to expose the bug.

This PR fixes the bug, and improves test coverage.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants