Possible Duplicate:
When do we need to use posix_memalign instead of malloc ?
When would you need “size bytes of memory such that the allocation’s base address is an exact multiple of alignment” over just a simple malloc()?
I believe it is memalign() under Linux and posix_memalign() under Mac OS X/BSD.
One of the most common use cases is when working with SIMD code (SSE, AltiVec, AVX, Neon, etc) where you typically need all buffers to be aligned on a SIMD vector boundary (16 byte or 32 byte alignment).
Another common alignment requirement is virtual memory page alignment (4 kB typically).