I am running a java program under Valgrind to check memory leaks in 32 bit Red hat Linux. While i execute the program using valgrind, JVM is not starting up throwing the below exception.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
My environment is
Red Hat Enterprise Linux Server release 6.2 (Santiago)
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Server VM (build 24.45-b08, mixed mode)
valgrind-3.6.0
I was able to run the same program without Valgrind successfully.The command used is
valgrind -v --smc-check=all --tool=memcheck --leak-check=yes --show-reachable=yes --leak-check=full --freelist-vol=100000000 --log-file=log.txt java -d32 -classpath "./bin:./lib/*" -Djava.library.path=/home/jni test.TestMain
Am I missing any thing here?