Java Heap Space on a Mac
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello,
I want to increase the amount of java heap space in Matlab. On my Linux machine with 16GB of RAM, I can go to "File -> Preferences -> Java Heap Memory" and I can set the heap up to 4 GB. However, on a Mac with 8GB of RAM, the preferences menu limits me to 256 MB. I have tried this in Matlab 2010a and 2011b.
Does anyone know how I can set the heap greater than 256 MB on a Mac?
Thanks in advance, T.R.
댓글 수: 0
답변 (1개)
the cyclist
2011년 8월 30일
I believe you can use the method outlined in this solution:
The first part of that solution describes how to do it as you describe, via the Preferences menu. However, just after that, it describes how to edit the "java.opts" file to increase the maximum heap size. Look for the Mac-specific part for finding the file.
You'll want to read some the caveats there about choosing a large heap size (as it effectively takes away workspace memory). I found solution by tracing from this blog post, which you might also find interesting:
In the end, you should be able to see if it worked by using the command:
>> max = java.lang.Runtime.getRuntime.maxMemory
I'd be interested to know if this works for you, so please let me know how it goes.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!