Mono Class Library: Mono.Unix.Native.Stdlib Overview | MembersMono.Unix.Native.Stdlib.calloc Method |
Allocate and zero-fill memory. [Edit]
|
The calloc function returns a pointer to the allocated memory if successful; otherwise IntPtr.Zero is returned and Stdlib.GetLastError returns Errno.ENOMEM. [Edit]
The calloc() function allocates space for nmemb objects, each size bytes in length. The result is identical to calling Stdlib.malloc(3) with an argument of "nmemb * size," with the exception that the allocated memory is explicitly initialized to zero bytes.
The return value of calloc must be passed to Stdlib.free to avoid a memory leak.
[Edit]
Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0