9 public unsafe
static void*
Alloc(nuint elementCount, nuint elementSize)
22 private unsafe
static nuint
GetByteCount(nuint elementCount, nuint elementSize)
24 nuint num = (nuint)((nint)1 << 4 *
sizeof(
UIntPtr));
25 if ((elementSize < num && elementCount < num) || elementSize == 0 || (nuint)
UIntPtr.
MaxValue / elementSize >= elementCount)
27 return elementCount * elementSize;
83 public unsafe
static void*
AllocZeroed(nuint elementCount, nuint elementSize)
94 public unsafe
static void Free(
void* ptr)
102 [CLSCompliant(
false)]
static unsafe void * _aligned_malloc(nuint size, nuint alignment)
static unsafe void * realloc(void *ptr, nuint new_size)
static unsafe void _aligned_free(void *ptr)
static unsafe void free(void *ptr)
static unsafe void * _aligned_realloc(void *ptr, nuint size, nuint alignment)
static unsafe void * malloc(nuint size)
static unsafe void * calloc(nuint num, nuint size)
static bool IsPow2(int value)
static unsafe nuint GetByteCount(nuint elementCount, nuint elementSize)
static unsafe void * AlignedRealloc(void *ptr, nuint byteCount, nuint alignment)
static unsafe void * AllocZeroed(nuint elementCount, nuint elementSize)
static unsafe void * AlignedAlloc(nuint byteCount, nuint alignment)
static unsafe void AlignedFree(void *ptr)
static unsafe void * Realloc(void *ptr, nuint byteCount)
static unsafe void * AllocZeroed(nuint byteCount)
static unsafe void Free(void *ptr)
static unsafe void * Alloc(nuint elementCount, nuint elementSize)
static unsafe void * Alloc(nuint byteCount)
static void ThrowOutOfMemoryException()
static void ThrowArgumentException(ExceptionResource resource)