
20 Feb
2014
20 Feb
'14
11:26 a.m.
Andrey Semashev wrote:
Note also that posix_memalign imposes specific requirements on the alignment that are not described in your docs.
I'd rather go the other way and round up to a sizeof(void*) multiple in the posix_memalign-based implementation. It makes no sense to me for aligned_alloc to not work for alignment 1, 2, 4 when sizeof(void*) is 8. IOW, it should work for alignof(T) for any T. The posix_memalign-specific requirement should not bubble up.