vec
vec copied to clipboard
Custom Memory Allocator Support
I am unsure if this project is still actively maintained, though I thought I would create the issue as it is still used in code today.
I wanted to propose the addition of support for custom memory allocation and freeing, just a simple set of macros (i.e. VEC_MALLOC, VEC_FREE, etc.). When such macros are defined, the library will use them in place of the default ones.
It is obviously trivial for users to add this behavior themselves with a few quick find/replace in the editor, I just thought it would be a nice feature to have out of the box that could be easily added without too much effort.
If you are willing to accept pull-requests, I would be happy to issue one for it. Either way, thank you for sharing :)
Create the pull request, it might be useful for others, even if it's not accepted. Having a "context' passed in to these custom allocators would be useful too (which is my case)
@mobius3 You make a good point. I don't believe there are any current maintainers, but I did issue the PR #16 anyways if anyone else ever stumbles across this issue and is interested.