[]
Allocate an aligned memory buffer.
public static IntPtr AllocateMemory(int sizeInBytes, int align = 16)
Type | Name | Description |
---|---|---|
int | sizeInBytes | Size of the buffer to allocate. |
int | align | Alignment, 16 bytes by default. |
Type | Description |
---|---|
IntPtr | A pointer to a buffer aligned. |
To free this buffer, call FreeMemory(IntPtr).