-
Notifications
You must be signed in to change notification settings - Fork 85
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
Make libsweep allocator aware #10
Comments
Could that be solved by adding another create device function that takes two additional function pointers as parameters (one for allocation and one for deallocation)? Maybe with an additional |
Not sure if device specific allocators make sense - we could simply store decltype(free) / decltype(malloc p) pointers in the library initialized with malloc and free and expose a function to set both? I don't quite fully understand the pros and cons here. For the impl. we can then provide a C++ allocator passing it to the stdlib functions and collections we use. Here are some notes on allocators in C++11 and a stack allocator: |
@daniel-j-h: You are probably right. That a global would suffice here. The additional question here is how much information we want to give the userabout implementation details to tune the allocator (either as a static guarantee or something that can be queried during runtime). Afaik there are 4 types of allocations:
|
We should provide means for the user to configure the allocator. The user should be able to plug in e.g. a efficient stack-allocator if she wants to. This needs to go hand in hand with the C++ abstractions.
The text was updated successfully, but these errors were encountered: