Allocates size bytes from the system heap.
- 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.
Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0