Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

memory allocation in JNI

843829Aug 12 2004 — edited Aug 13 2004
I have an C application which uses JNI, running on Win2k.

I have a java class which loads my C DLL in the following fashion,

static {
// Load the native dll
System.loadLibrary("NewDll");

}

The code works absolutely fine for all its functionality. But sometimes the application crashes giving "Out of memory" error.
I want to know if I allocate memory from the heap in the native DLL(using malloc); from which heap is it allocated?. Is it the JNI heap or the Windows heap.

PLEASE HELP...ITS VERY URGENT.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2004
Added on Aug 12 2004
2 comments
716 views