[libcxx-commits] [libcxx] [libcxx] Use `aligned_alloc` for testing instead of `posix_memalign` (PR #101748)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 5 11:59:49 PDT 2024
================
@@ -460,6 +460,8 @@ inline void* alocate_aligned_impl(std::size_t size, std::align_val_t align) {
void* ret = nullptr;
# ifdef USE_ALIGNED_ALLOC
ret = _aligned_malloc(size, alignment);
+# elif TEST_STD_VER >= 17
+ ret = aligned_alloc(alignment, size);
----------------
ldionne wrote:
I think we might need to round the size like we do here: https://github.com/llvm/llvm-project/blob/main/libcxx/include/__memory/aligned_alloc.h#L34-L43
https://github.com/llvm/llvm-project/pull/101748
More information about the libcxx-commits
mailing list