Casey Marshall wrote:
> Also, in JCL_malloc and JCL_realloc we throw OutOfMemoryExceptions if
> the native calls return NULL. It doesn't seem like this will work
> (though, if there is an explanation of why it will always work, I'll
> listen), so I've also modified this to allocate a static
> OutOfMemoryException on load, and these methods now throw
> that instance.

That's a good idea, but there's a bug in the implementation:

+    (*env)->NewGlobalRef (env, OOM_obj);

That's not how NewGlobalRef works, it returns a new global ref, it doesn't 
modify the passed in ref.

Regards,
Jeroen

Reply via email to