[GME-commit] GMESRC/Java/native/JavaCompRunner RawComponent.cpp, 1.5, 1.6
Log messages of CVS commits
gme-commit at list.isis.vanderbilt.edu
Mon Feb 25 11:20:05 CST 2008
Update of /project/gme-repository/GMESRC/Java/native/JavaCompRunner
In directory escher:/tmp/cvs-serv6257/Java/native/JavaCompRunner
Modified Files:
RawComponent.cpp
Log Message:
Memory parameter added.
Add JavaMemory next to JavaClassPath to specify java vm memory size.
eg.: JavaMemory 512M
It is an optional entry.
CVS User: Gyorgy Balogh, ISIS (bogyom)
Index: RawComponent.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Java/native/JavaCompRunner/RawComponent.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RawComponent.cpp 10 Dec 2007 22:42:41 -0000 1.5
--- RawComponent.cpp 25 Feb 2008 17:20:03 -0000 1.6
***************
*** 32,35 ****
--- 32,37 ----
char classPath[2000];
+ char memory[100];
+ char memory_buf[200];
char buf[2000];
unsigned long bufSize;
***************
*** 44,47 ****
--- 46,57 ----
RegCloseKey(regkey);
+ // query java memory
+ sprintf( memory, "" );
+ RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\GME", 0, KEY_EXECUTE, ®key);
+ type = REG_SZ;
+ bufSize = 100;
+ RegQueryValueEx(regkey, "JavaMemory", NULL, &type, (LPBYTE)memory, &bufSize );
+ RegCloseKey(regkey);
+
// query jvm.dll path from registry
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\JavaSoft\\Java Runtime Environment", 0, KEY_EXECUTE, ®key);
***************
*** 90,99 ****
JavaVMOption options[2];
- args.version = JNI_VERSION_1_2;
- args.nOptions = 2;
sprintf(buf, "-Djava.class.path=%s", classPath);
options[0].optionString = buf;
! options[1].optionString = "-Xmx512M";
! args.options = options;
args.ignoreUnrecognized = JNI_FALSE;
--- 100,117 ----
JavaVMOption options[2];
sprintf(buf, "-Djava.class.path=%s", classPath);
options[0].optionString = buf;
!
! args.version = JNI_VERSION_1_2;
! if( strlen(memory) > 0 )
! {
! args.nOptions = 2;
! sprintf(memory_buf, "-Xmx%s", memory);
! options[1].optionString = memory_buf;
! }
! else
! args.nOptions = 1;
!
! args.options = options;
args.ignoreUnrecognized = JNI_FALSE;
More information about the GME-commit
mailing list