When allocating memory in CNI methods it is best to handle
out-of-memory conditions by throwing a Java exception. These
functions are provided for that purpose:
— Function: void* JvMalloc (jsize size)
Calls malloc. Throws java.lang.OutOfMemoryError if allocation
fails.