Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add thread deinit API #22

Merged
merged 6 commits into from
Feb 26, 2024
Merged

Add thread deinit API #22

merged 6 commits into from
Feb 26, 2024

Conversation

dweiller
Copy link
Owner

The way heaps are handled for different threads is likely to change in order to solve #16, but in the meantime this is a simple solution to allow the user to remove threads from the heap list.

@dweiller dweiller force-pushed the thread-deinit branch 2 times, most recently from 162dabf to 9f1c177 Compare January 26, 2024 08:05
src/thread_heaps.zig Outdated Show resolved Hide resolved
In order to permit removing threads from the list while maintaining
stable pointers to heaps a linked list is required. A future
enchancement could replace the use of `std.heap.MemoryPool` with a
custom allocation strategy, since the arena allocator backing a memory
pool does not currently take advantage of the fact that the page
allocator always allocates whole pages.
@dweiller dweiller merged commit 53ccec1 into main Feb 26, 2024
2 checks passed
@dweiller dweiller deleted the thread-deinit branch February 26, 2024 15:16
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.

1 participant