Different Java heap size for 32- and 64-bit versions of the same release

조회 수: 4 (최근 30일)
Michael
Michael 2017년 9월 21일
편집: Michael 2017년 9월 21일
I have need for both 32- and 64-bit R2015b on my Windows machine. I use 64-bit MATLAB most of the time and would like lots of Java heap space (2GB is usually a good amount since I have 32GB physical RAM). It will let me set the slider to 2048MB in Preferences just fine. However, I do occasionally need to use the 32-bit version. When I open it, it immediately complains that it can't start the JVM because there's not enough memory and that next time it'll go back to the default 256MB. But then that restricts the 64-bit version. The matlab.prf file doesn't appear to have any way of distinguishing 32- vs. 64-bit architecture to set it there. And a java.opts file isn't MATLAB syntax so I can't set it conditionally based on computer('arch') either. Any suggestions on a workaround so each build of a particular release can have a different max heap size?

채택된 답변

Michael
Michael 2017년 9월 21일
편집: Michael 2017년 9월 21일
Nevermind... I just put the java.opts files in "C:\Program Files\MATLAB\R2015b\bin\win64" and "C:\Program Files (x86)\MATLAB\R2015b\bin\win32" rather than in the startup folder, setting appropriate limit (-Xmx2048m and -Xmx512m, respectively) in each location.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by