matlab的“内存"在Mac上功能? [英] matlab "memory" function on mac?
问题描述
在Windows计算机上,MATLAB用户可以使用 memory
或 feature memstats
命令.但是,这些都不在机器上工作,失败如下:
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
有人知道在Mac上访问有关Matlab内存使用情况的信息的方法吗?
Does anyone know of a way to access information about in-matlab memory usage on a Mac?
推荐答案
我找不到能够重现memory
功能的命令.但是,如果您知道系统有多少总内存,则可以使用 vsize
从文件交换中获取更多详细信息)以估算变量当前正在使用多少内存,以及因此拥有多少可用空间.
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.
顺便说一句,您始终可以通过调用来查找有关Java内存的信息
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
请注意,Matlab内存和Java内存是不同的-Java内存用于UI(包括图形以及其他Java对象),而memory
报告可用于变量和计算的内存.
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.
这篇关于matlab的“内存"在Mac上功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!