Hi,
I have a problem with a self written c++ dll.
The dll needs a bit of memory, about 500MB to 1GB but crashes during dynamic allocation.
The memory allocation is not influenced by any parameter passed from the original java program via the JNI. If it is solely executed as a simple cpp.exe it works absolutely fine, it only crashes as a by JAVA called dll.
Due to plenty of couts I am definitely sure that it crashes executing the following line of code:
data = new float[TABLE_SIZE];
whereas data is a float pointer and TABLESIZE is about 37 million entries. Hence it needs 150 MB space.
But instead of allocating, it crashes with the error message:
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!
Program: C:\Program Files (x86)\Java\jre6\bin\javaw.exe
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
---------------------------
OK
---------------------------
This happen although I still have 1.8 GB free RAM.
Does anybody know how JAVA can provide more memory to the dll?
Thanks a lot!

