Requests aligned memory with posix_memalign.

The previous arrangement was causing memory errors since buffers would be released by the GC without taking into account their starting address.