"Function MEMORY is not available on this platform."

45 views (last 30 days)
I followed
and ran a command memory but got the following outcome
>> memory
Error using memory
Function MEMORY is not available on this platform.
What is going on?

Accepted Answer

Steven Lord
Steven Lord on 26 Jul 2020
As stated in the Limitations section on the documentation page for the memory function, this function is only supported on Microsoft Windows systems.
  3 Comments
Geoff May
Geoff May on 25 May 2023
Not sure if the functionality is identical, but the following call to java will give you a number that matches up with the Java heap memory that is set in preferences:
runtime = javaMethod('getRuntime', 'java.lang.Runtime');
maxMemory = javaMethod('maxMemory', runtime);
Walter Roberson
Walter Roberson on 25 May 2023
If I recall, on Linux you would want to first find your process ID, and then example the /proc file system entry for that process, as that can tell you how much memory the process is using.

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!