This article explains the causes for this exception and suggests some solutions.
You may get this error when launching Talend Studio or running a Job. Sometimes, you want to allocate more memory to a Job execution by setting the -Xmx Java VM parameter, but the Job fails to run and throws the error.
Could not create the Java virtual machine. Error occurred during initialization of VM. Could not reserve enough space for object heap.
The result is that Talend Studio does not start or the Job does not run. The cause of this error is that the available memory is not sufficient for the maximum heap size set by -Xmxparameter.
The default JVM parameters are set in the ini configuration file, such as TOS_DI-win32-x86.ini:
-vmargs -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8
-Xms sets the initial heap size and -Xmx sets the maximum heap size.
By default, the maximum heap size is set to 768m.
The maximum theoretical heap limit for the 32-bit or 64-bit JVM could be higher than the physical memory that the machine has. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. Especially 32-bit VM, on most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit Solaris kernels the address space is limited to 2G. On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems. Hence, Talend suggests the following solutions for resolving this error.