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

Internal memory allocation callbacks #25

Open
raxvan opened this issue Aug 18, 2018 · 4 comments
Open

Internal memory allocation callbacks #25

raxvan opened this issue Aug 18, 2018 · 4 comments
Labels
feature request Requested features and TODO lists

Comments

@raxvan
Copy link
Contributor

raxvan commented Aug 18, 2018

Does LLGL have support for host memory allocations callbacks ? Such as VkAllocationCallbacks for vulkan? How about other apis (dx, ogl, etc) and other library allocations ?

If not, is this planned ?

@raxvan raxvan changed the title Internal memory allocation Internal memory allocation callbacks Aug 18, 2018
@LukasBanana LukasBanana added the feature request Requested features and TODO lists label Aug 19, 2018
@LukasBanana
Copy link
Owner

The Vulkan backend is still in an experimental state. Compared to the D3D12 and Metal backends more usable, though.
However, right now there is no such interface to control the Vulkan allocation model.
I currently also have no plans when and how I implement this.
As long as the Vulkan backend does not have significiantly better performance than the D3D11 and GL backends, I don't see the necessity for such fine grained memory control.

@ForgeMistress
Copy link

What about memory control of the internal structures that LLGL itself allocates? Is there a way for us to define allocation routines for the library as a whole?

@LukasBanana
Copy link
Owner

There are currently no interfaces or plans for this fine-grained memory control. LLGL uses the default STL containers and allocators only (with very few exceptions).

@ForgeMistress
Copy link

I guess an alternative then is to overload the default new and delete. I've got allocation tracking for leak detection and a few cache coherence tricks I'm using to squeeze some perf out of my framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requested features and TODO lists
Projects
None yet
Development

No branches or pull requests

3 participants