-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
libc/minimal: provide aligned allocators #29529
libc/minimal: provide aligned allocators #29529
Conversation
In #28611 the sys_mem_pool allocator gets removed |
mis-click sorry can you set this as a Draft PR since it is still WIP |
Now it all makes sense! Thanks for pointing that out @maxbachmann |
I cherry-picked from #30003 #28611, so please wait until after those are merged before reviewing. |
Provide a standard aligned allocation API via posix_memalign(3) and aligned_alloc(3) in the minimal libc. Fixes #29519 Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
This change adds tests for aligned allocators posix_memalign(3) and aligned_alloc(3) in the minimal libc. Fixes #29519 Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Closing this in favour of #30363 for a couple of reasons.
In any case, #30363 is really just recycling the |
I don't agree with the "pointless" valuation: POSIX provides them, that's pretty good a reason on its own. That said, you're designer of this feature. |
Sorry, - it's definitely not "pointless". You're right. For my current purposes though (#29029) I unfortunately can't use I'll keep the branch around just in case we want to add this in the future. Personally, I think supporting standards are important. |
That at least should lead to traces of ideas for some kind of "polyfills" (curse JavaScript for abusing thru the entire industry), where we can add functionality for both newlib and minlibs. Actually, we do things like that already - newlib doesn't ship e.g. select() implementation, we do. (That's not call for action, just call for thinking and maybe planning ahead.) |
This change adds support for standardized aligned allocation APIs via
posix_memalign(3)
andaligned_alloc(3)
in the minimal libc.Fixes #29519