JNI segmentation fault

Hello,

I have problems with JNI.

I have method for solving large system of linear equations, written in C++. This is called within java via JNI.

When I call this method with little system (say 2-3thousands of equations), I recieved correct result.

When I call the method with higher number of equations, I get Segmentation Fault (this occured on places in C++ code, where I allocate memory)

When I run just pure C++ program (within java, but using Runtime.execute, no JNI), which calls the same C++ method, I can solve much larger systems without any memory error.

I tried to set -Xmx to the value of 1GB (which is much more than eventually needed by C++ program) when running java, but with no help.

I use linux.

I'll be glad for any suggestions.

Miro

[819 byte] By [miroslav_simkoa] at [2007-11-26 15:18:17]
# 1
I finally solved the problem. In C++ code, I declared array with huge length (10thousand...) in static way. I changed that to dynamicly created array using operator new, and now everything works perfect.
miroslav_simkoa at 2007-7-8 11:00:51 > top of Java-index,Java HotSpot Virtual Machine,Specifications...