MemoryAvailable

MemoryAvailable[]

gives the estimated number of bytes readily available for storing additional data in the current Wolfram Language kernel session.

Details

  • MemoryAvailable[] reports memory that is available for allocation by your operating system.
  • MemoryAvailable[] is affected by other processes running on your computer system.
  • Dynamic[MemoryAvailable[]] gives dynamic results for available memory.
  • On Mac, MemoryAvailable[] returns the sum of free and inactive memory.
  • On Windows, MemoryAvailable[] returns the available memory reported by the operating system.
  • On Linux, MemoryAvailable[] returns the MemAvailable parameter value of /proc/meminfo.

Examples

Basic Examples  (3)

Memory available in the current kernel session:

In[1]:=
Click for copyable input
Out[1]=

Set up a dynamic display of available memory:

In[1]:=
Click for copyable input
Out[1]=

Measure memory available before and after a computation:

In[1]:=
Click for copyable input
Out[1]=

The difference in available memory is roughly accounted for by the structure created:

In[2]:=
Click for copyable input
Out[2]=

See Also

SystemInformation  MemoryConstrained  MemoryInUse  MaxMemoryUsed  ByteCount  Share

Tutorials

Introduced in 2017
(11.2)