memalign() is a wrapper around malloc().
The memalign() function allocates from a private heap.
Do not mix with Win32 heap allocation functions.
Memory allocated with memalign() should only be freed with
free().

Unlike many UNIX platforms, the heap that is used by
malloc(), memalign(),
calloc(), and realloc() is not guaranteed
to be one contiguous piece of memory.
Thus it is invalid to assume that all memory
between two pointers returned by these functions are
accessible, and it is invalid to compare pointers returned by
these functions to determine the total size of the heap.

It is recommended that new code
not use this function and it is further recommended that its use
in older code be reconsidered. It is only included to allow older
code to recompile. The UNIX 98 specification does not have this
function. Most modern operating systems memory allocation
routines return aligned memory.