Make aligned allocation without posix_memalign more robust

Instead of guessing the right function to use, we malloc() 15 bytes more than
we need, and compute the aligned offset within.  The AlignedBuffer class takes
care of passing the original pointer to free().
This commit is contained in:
Keegan McAllister
2012-03-24 22:46:51 -04:00
committed by Keith Winstein
parent 0734640e14
commit 3b61581bcd
3 changed files with 27 additions and 23 deletions
+1
View File
@@ -118,6 +118,7 @@ AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_TYPE_UINTPTR_T
# Checks for library functions.
AC_FUNC_FORK