move alignment check from aligned_alloc to posix_memalign
authorRich Felker <dalias@aerifal.cx>
Fri, 5 Jul 2013 03:54:12 +0000 (23:54 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 5 Jul 2013 03:54:12 +0000 (23:54 -0400)
commit651416182dc65d75e91cadfec65dd72f9ff07846
tree4f1a085a262cb195f1fab6a27b7f0335b35712fc
parentab724204393bcc990d519b1358f4ec3ee1f3a570
move alignment check from aligned_alloc to posix_memalign

C11 has no requirement that the alignment be a multiple of
sizeof(void*), and in fact seems to require any "valid alignment
supported by the implementation" to work. since the alignment of char
is 1 and thus a valid alignment, an alignment argument of 1 should be
accepted.
src/malloc/aligned_alloc.c
src/malloc/posix_memalign.c