| Parameter | Description |
|---|---|
| size | The size to align. |
| alignmentPowerOfTwo | A non-zero, positive power of two. |
int
The smallest integer that is greater than or equal tosize and is a multiple of alignmentPowerOfTwo.
Returns an allocation size in bytes that factors in alignment.
// 55 aligned to 16 is 64. int size = CollectionHelper.Align(55, 16);
| Parameter | Description |
|---|---|
| size | The size to align. |
| alignmentPowerOfTwo | A non-zero, positive power of two. |
long
The smallest integer that is greater than or equal tosize and is a multiple of alignmentPowerOfTwo.
Returns an allocation size in bytes that factors in alignment.
// 55 aligned to 16 is 64. long size = CollectionHelper.Align(55, 16);
| Parameter | Description |
|---|---|
| size | The size to align. |
| alignmentPowerOfTwo | A non-zero, positive power of two. |
ulong
The smallest integer that is greater than or equal to size and is a multiple of alignmentPowerOfTwo.
Returns an allocation size in bytes that factors in alignment.
// 55 aligned to 16 is 64. ulong size = CollectionHelper.Align(55, 16);