Next: Arrays, Previous: Object allocation, Up: About CNI [Contents][Index]
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:
Calls malloc. Throws java.lang.OutOfMemoryError
if allocation
fails.
Calls realloc. Throws java.lang.OutOfMemoryError
if
reallocation fails.
Calls free.