tryMalloc

fnvoid * tryMalloc(size_t nBytes)

Attempts to allocate n_bytes, and returns null on failure. Contrast with [glib.global.gmalloc], which aborts the program on failure.

Parameters

nBytesnumber of bytes to allocate.

Returns

the allocated memory, or null.