필터 지우기
필터 지우기

How do I increase Java Heap Size to greater than 4 GB?

조회 수: 44 (최근 30일)
Deniz
Deniz 2013년 12월 5일
댓글: Lennard 2023년 2월 17일
I need to increase the Java heap size to 6GB or higher since I will be reading big data.
I have 64 bit Windows, and am running 64bit MATLAB 2013b + Java SE Runtime 1.7.0_40-b43 (64-bit).
But the Java Heap Size option in MATLAB only allows me to have up to 4 GB.
  댓글 수: 3
Meshooo
Meshooo 2014년 4월 22일
편집: Meshooo 2014년 4월 22일
I have the same problem. Were you able to solve it?
Thank you.
Ken Atwell
Ken Atwell 2014년 4월 22일
Meshoo and Deniz, if you are have problems reading big data, can you describe that problem? As I've said below, increasing the Java heap does not seem like the right approach to me.

댓글을 달려면 로그인하십시오.

답변 (2개)

Friedrich
Friedrich 2014년 4월 22일
편집: Friedrich 2014년 4월 22일
Hi,
MATLAB uses 1/4 of your physical memory as maximum value for the heap space. You might be able to edit the matlab.prf file to increase that limit (however not sure if this might cause issues):
  1. From the Java Heap Memory section inside General window in Preferences tab, set thevalue of Java Heap size to some value other than the default.
  2. Close and Reopen MATLAB
  3. On the command window type the following command:>> prefdir
  4. Move to this directory and edit the MATLAB.PRF file.
  5. Locate the following line of command and change the value to desired Heap size in MB.JavaMemHeapMax=l4150 (This value of approximately 4GB is an example)
  6. Close and Reopen MATLAB again. Check with java.lang.Runtime.getRuntime.maxMemory if the change took effect.

Ken Atwell
Ken Atwell 2014년 4월 22일
MATLAB does not use the Java heap to allocate workspace variables. If you are reading big data into your workspace, increasing the Java heap will probably have no effect, or possibly a negative effect.
  댓글 수: 1
Lennard
Lennard 2023년 2월 17일
But if you use huge Simulink Models, it will help, right?

댓글을 달려면 로그인하십시오.

카테고리

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