matlab “memory” function on mac?

后端 未结 3 1871
北荒
北荒 2020-12-20 13:48

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:

>>          


        
3条回答
  •  星月不相逢
    2020-12-20 14:45

    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.

提交回复
热议问题