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

1 回表示 (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by