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

Fix pool allocator #190

Merged
merged 3 commits into from
Dec 17, 2024
Merged

Fix pool allocator #190

merged 3 commits into from
Dec 17, 2024

Conversation

inakleinbottle
Copy link
Contributor

Older versions of libc++, such as those found on MacOs <14, don't implement std::pmr::memory_resource, but for some reason still compiles and links. This leads to a rather frustrating missing symbol error at load-time, causing the program to fail unexpectedly. For this reason, I've swapped out the std::pmr::synchronized_pool_allocator for a boost::pool that also provides a pool-style allocator that we can use for small objects. I don't know if this functions in precisely the same way was the std version, but at least it is platform independent and faster than "malloc"ing everything.

This commit includes the boost-pool library with version 1.86.0 as a new dependency. It ensures required functionality is available for memory pooling. No other changes were made to the dependency list.
The Boost.Pool library has been included in the list of dependencies in CMakeLists.txt. This change ensures that the project can leverage memory pooling functionality provided by Boost.
Replaced standard polymorphic memory resource with Boost's `pool` for small object allocation. This improves alignment handling and simplifies the custom allocator logic while maintaining proper deallocation behavior. Removed obsolete commented-out code for clarity.
@inakleinbottle inakleinbottle merged commit e7fd8e8 into main Dec 17, 2024
3 checks passed
@inakleinbottle inakleinbottle deleted the fix-pool-allocator branch December 17, 2024 17:04
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