On Windows machines, MATLAB users can use either the memory
or the feature memstats
commands. However, neither of these work on a machine, failing as follows:
>> memory ??? Error using ==> memory Function MEMORY is not available on this platform. >> feature memstats ??? Error using ==> feature An unknown feature was specified
Does anyone know of a way to access information about in-matlab memory usage on a Mac?
Retrieve Memory Information Use the structure to display the amount of memory reserved for the MATLAB process. Return both the user-focused and system-focused memory information. Access the Available field of the PhysicalMemory structure to display the amount of available physical memory on the computer.
RAM System object reads and writes to specific locations in hRam . Code generation from hdl. RAM has the same restrictions as code generation from other System objects. For details, see Limitations of HDL Code Generation for System Objects.
I have not been able to find a command that reproduces the functionality of memory
. However, if you know how much total memory your system has, you can use who
(or vsize
from the file exchange for more detail) to estimate how much memory your variables are currently using and thus how much free space you have.
By the way, you can always find out about Java memory by calling
java.lang.Runtime.getRuntime.maxMemory
java.lang.Runtime.getRuntime.totalMemory
java.lang.Runtime.getRuntime.freeMemory
Note that Matlab memory and Java memory are different - Java memory is used for UI, including figures, as well as other java objects, while memory
reports the memory available for variables and calculations.
memory
is only available on Windows systems.
You can try using top
built-in Mac command instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With