Skip to content

Enable selective use of the C++ allocator #61

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Enable selective use of the C++ allocator #61

wants to merge 3 commits into from

Conversation

bifurcation
Copy link
Contributor

In #50, we didn't make the allocator optional, we made it forbidden. This PR adds a NO_ALLOC flag that turns off the allocator dependency. If that flag is enabled, we use std::vector and std::map as normal. If it is enabled, then we use our custom, fixed-size vector/map implementations.

The main note of caution here is that we inherit from STL containers. This is fine within the scope of this library, but can cause memory leaks in certain other situations.

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