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

Make aligned heap alloc public #39

Closed
santagada opened this issue Jun 25, 2019 · 4 comments
Closed

Make aligned heap alloc public #39

santagada opened this issue Jun 25, 2019 · 4 comments

Comments

@santagada
Copy link

currently mi_heap_malloc_zero_aligned_at is not on the public api, and there is no aligned heap api's, it should be fairly simple and useful to have this as a public api right?

I can make a PR if wanted, I just got curious why it isn't so already.

@daanx
Copy link
Collaborator

daanx commented Jun 26, 2019

Hi Santagada, thanks for your feedback: there are many alignment functions, see:
https://microsoft.github.io/mimalloc/group__aligned.html

The mi_heap_malloc_zero_aligned_at is the internal function that all the others use.
The function mi_zalloc_aligned does zero initialized aligned allocation.
Hope that helps :-)

@santagada
Copy link
Author

none of these take a heap as a parameter, that is my problem, doing aligned allocations on a particular heap

@daanx
Copy link
Collaborator

daanx commented Jun 26, 2019

Ah I see! I will add this to the API surface.

@daanx
Copy link
Collaborator

daanx commented Jul 9, 2019

Done in the latest dev branch :-)

@daanx daanx closed this as completed Jul 9, 2019
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

No branches or pull requests

2 participants