P
Paul J. Lucas
A coworker of mine claims that if you do JNI calls in C to
allocate memory, e.g., NewShortArray(), and if there is
currently insufficient memory on the Java side, that the call
will fail without having run garbage collection, i.e., JNI
memory allocation calls never trigger garbage collection. Is
this true? If so, it seems wrong, i.e., it should trigger GC
just like an allocation in Java does. If so, why is it this
way?
- Paul
allocate memory, e.g., NewShortArray(), and if there is
currently insufficient memory on the Java side, that the call
will fail without having run garbage collection, i.e., JNI
memory allocation calls never trigger garbage collection. Is
this true? If so, it seems wrong, i.e., it should trigger GC
just like an allocation in Java does. If so, why is it this
way?
- Paul