[]
Allocate an aligned memory buffer and clear it with a specified value (0 by default).
public static IntPtr AllocateClearedMemory(int sizeInBytes, byte clearValue = 0, int align = 16)
Type | Name | Description |
---|---|---|
int | sizeInBytes | Size of the buffer to allocate. |
byte | clearValue | Default value used to clear the buffer. |
int | align | Alignment, 16 bytes by default. |
Type | Description |
---|---|
IntPtr | A pointer to a buffer aligned. |
To free this buffer, call FreeMemory(IntPtr).