I am creating a JVM instance through C ++. I pass a couple parameters of the virtual machine when creating the instances. But at least one of the parameters for the maximum heap size does not show any difference. The maximum heap size always shows 65,536 KB, which parameter do I provide for it.
The code is shown below.
jvm=NULL; env=NULL; long result; char *pathname=(char*)malloc(1024); strcpy(pathname,"-Djava.class.path="); strcat(pathname,"/*class path*/"); vm_args.version= 0x00010006; vm_args.ignoreUnrecognized=JNI_TRUE; options[0].optionString=pathname; options[1].optionString="-Xms512M"; options[2].optionString="-Xmx1024M"; vm_args.options=options; vm_args.nOptions=3;
Any suggestion. Thanks in advance.
source share