Ensures that the given buffer is aligned to the given alignment.
If alignment is not specified, the default alignment of 32 is used.
If the buffer is already aligned, it is returned.
If the buffer is not aligned, a new aligned buffer is created with bufferAlignedAllocUnsafe or bufferAlignedAllocShared and the data is copied.
Ensures that the given buffer is aligned to the given alignment. If alignment is not specified, the default alignment of 32 is used. If the buffer is already aligned, it is returned. If the buffer is not aligned, a new aligned buffer is created with bufferAlignedAllocUnsafe or bufferAlignedAllocShared and the data is copied.