Can I access more than 2GB of memory when running a 32-bit MATLAB 7.5 (2007b) on a Mac ?

1 view (last 30 days)
I am running 32-bit MATLAB on a Mac. Can I access more than 2GB of memory? How can I increase the amount of memory I can use?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Dec 2021
Edited: MathWorks Support Team on 13 Dec 2021
In theory, 32-bit applications can address up to 4GB of virtual memory.
However, a number of things affect the actual memory accessibility:
1. The Operating System reserves memory for itself, reducing the amount of memory its applications can use.
2. Other applications running at the same time can eat up memory as well.
3. MATLAB reserves memory for itself. Even when there is no code running and there are no variables in the workspace, MATLAB is still using memory.
4. The memory available to MATLAB may be fragmented when starting additional tools or toolboxes, or loading MATLAB functions into memory. This limits the size of the largest contiguous block of memory. Since MATLAB matrices need to be stored in contiguous blocks, Out of Memory errors can occur while trying to create a matrix larger than the size of the largest contiguous block, even if that memory exists in several fragmented blocks.
There are tools for memory management for Macs:
The TOP command allows you to view the RPRVT (amount of memory in use) and VSIZE(amount of virtual memory paged so far) for the applications with top CPU usage:
top
To access more memory you can run MATLAB from xterm with –nojvm option:
matlab –nojvm
which does not load Java Virtual Machine and thus saves memory MATLAB uses for itself otherwise.
For more on Memory Management, please refer to the following Tech Notes:

More Answers (0)

Categories

Find more on Performance and Memory in Help Center and File Exchange

Products


Release

R2007b

Community Treasure Hunt

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

Start Hunting!