try_malloc0


Description:

[ Version ( since = "2.8" ) ]
public void* try_malloc0 (size_t n_bytes)

Attempts to allocate n_bytes, initialized to 0's, and returns null on failure.

Contrast with malloc0, which aborts the program on failure.

Parameters:

n_bytes

number of bytes to allocate

Returns:

the allocated memory, or null


Namespace: GLib
Package: glib-2.0