tryMalloc

fun tryMalloc(nBytes: <Error class: unknown class>): <Error class: unknown class>?

Attempts to allocate @n_bytes, and returns null on failure. Contrast with g_malloc(), which aborts the program on failure.

Return

the allocated memory, or null.

Parameters

nBytes

number of bytes to allocate.