How to increase memory available for arrays?

조회 수: 24 (최근 30일)
Mauricio Girardi Schappo
Mauricio Girardi Schappo 2020년 8월 7일
댓글: James Tursa 2020년 8월 7일
I am running 64bits Windows and MATLAB R2019b.
When I type "memory", I get:
Maximum possible array: 2314 MB (2.427e+09 bytes) *
Memory available for all arrays: 2314 MB (2.427e+09 bytes) *
Memory used by MATLAB: 2061 MB (2.162e+09 bytes)
Physical Memory (RAM): 16250 MB (1.704e+10 bytes)
But in MATLAB "memory" help page, it says that memory is limited by the smaller of the following
  • The largest contiguous memory block found in the MATLAB virtual address space
  • The total available system memory
So I can only assume that MATLAB is not able to allocate contiguous memory in its virtual address space that's more than 2GB...
Is this some limitation imposed by Windows 10 Home related to its heap manager?
Or how can I expand this value? Do I have to tweak with windows parameters somewhere?
This memory issue causes MATLAB to crash whenever I am plotting multiple "surf" figures, which rely on many large matrices...
The "Solve out of memory page" does not help, since I have the MATLAB preference set to not limit arrays according to RAM:
When I start MATLAB without JVM, I get
Maximum possible array: 2487 MB (2.608e+09 bytes) *
Memory available for all arrays: 2487 MB (2.608e+09 bytes) *
Memory used by MATLAB: 984 MB (1.031e+09 bytes)
Physical Memory (RAM): 16250 MB (1.704e+10 bytes)
So JVM is not the problem.
I am running MATLAB 9.7.0.1190202 (R2019b, 64bits) on Windows 10 Home (64bits), version 2004, build 19041.388
  댓글 수: 1
James Tursa
James Tursa 2020년 8월 7일
If MATLAB actually crashes when calling surf for out of memory cases, you should submit a bug report. There shouldn't be a crash, just an out of memory error message.

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

답변 (1개)

Matt J
Matt J 2020년 8월 7일
편집: Matt J 2020년 8월 7일
A simple solution might be to close other applications that might be consuming RAM. For example, closing Microsoft Outlook freed up almost 0.5 GB for me,
K>> memory
Maximum possible array: 18897 MB (1.981e+10 bytes) *
Memory available for all arrays: 18897 MB (1.981e+10 bytes) *
Memory used by MATLAB: 22442 MB (2.353e+10 bytes)
Physical Memory (RAM): 32654 MB (3.424e+10 bytes)
* Limited by System Memory (physical + swap file) available.
K>> memory
Maximum possible array: 19323 MB (2.026e+10 bytes) *
Memory available for all arrays: 19323 MB (2.026e+10 bytes) *
Memory used by MATLAB: 22434 MB (2.352e+10 bytes)
Physical Memory (RAM): 32654 MB (3.424e+10 bytes)
  댓글 수: 5
James Tursa
James Tursa 2020년 8월 7일
Ouch! Buy a GPU card.
Mauricio Girardi Schappo
Mauricio Girardi Schappo 2020년 8월 7일
편집: Mauricio Girardi Schappo 2020년 8월 7일
Well, I do have a GPU card... I just set the system to use by default the NVIDEA card... MATLAB now jumped to 9 GB (still about half the system memory)... I looked it up in the Resource Manager... It seems the system has "cached" about 3 GB (I don't know why, but it should be a windows thing), and the rest is being used by MATLAB itself + other processes... So then it seems there's no way I can increase that number for available array memory anyways

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

카테고리

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