[libcxx-commits] [libcxx] [libc++] Improve aligned allocation support with picolibc. (PR #96086)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 24 05:17:50 PDT 2024


philnik777 wrote:

I don't think "why doesn't libc++ just add another #ifdef" is a reasonable response. While POSIX isn't available everywhere, it is still ubiquitous. There are only roughly 2x as many users of `aligned_alloc` compared to `posix_memalign` out there (https://sourcegraph.com/search?q=context:global+posix_memalign+count:all&patternType=keyword&sm=0 vs https://sourcegraph.com/search?q=context:global+aligned_alloc+count:all&patternType=keyword&sm=0). Given the simplicity of adding it (AFAICT it's simply a wrapper for `aligned_alloc`) vs the amount of code that already exists out there you'd additionally support, it seems like a no-brainer to me. If there is a good reason not to implement it, I'd love to hear it.

CC @mplatings


https://github.com/llvm/llvm-project/pull/96086


More information about the libcxx-commits mailing list