- size
- A long containing the number of bytes to allocate on the system heap.
A IntPtr containing the address of size bytes on the system heap, or IntPtr.Zero if the memory could not be allocated.
Type Reason ArgumentOutOfRangeException size is a negative value.
The "system heap" is where dynamic memory is allocated by the runtime C library, MSVCRT.DLL on Win32 and libc on Unix platforms.
The memory allocated by this function must be freed via UnixMarshal.FreeHeap to avoid a memory leak.