Merge branch 'llvm-memalign' into 'master'

Revert 292fd9e to fix LLVM allocation issue

See merge request redox-os/relibc!1300
This commit is contained in:
Jeremy Soller
2026-05-10 13:47:21 -06:00
+6 -3
View File
@@ -147,9 +147,12 @@ pub unsafe extern "C" fn aligned_alloc(alignment: size_t, size: size_t) -> *mut
platform::ERRNO.set(EINVAL);
return ptr::null_mut();
}
let mut pointer = ptr::null_mut();
unsafe { posix_memalign(ptr::from_mut(&mut pointer), alignment, size) };
pointer
/* The size-is-multiple-of-alignment requirement is the only
* difference between aligned_alloc() and memalign(). */
#[allow(deprecated)]
unsafe {
memalign(alignment, size)
}
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/at_quick_exit.html>.