Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Custom Memory Allocator Support #14

Open
ForeverZer0 opened this issue Apr 17, 2020 · 2 comments
Open

Custom Memory Allocator Support #14

ForeverZer0 opened this issue Apr 17, 2020 · 2 comments

Comments

@ForeverZer0
Copy link

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 :)

@mobius3
Copy link

mobius3 commented Nov 16, 2020

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)

@ForeverZer0
Copy link
Author

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants