MaxMemoryUsed

MaxMemoryUsed[]
gives the maximum number of bytes used to store all data for the current Mathematica session.

DetailsDetails

  • On most computer systems, MaxMemoryUsed[] will give results close to those obtained from external process status requests.
  • MaxMemoryUsed[] will not typically account for code space, stack space, or the effects of heap fragmentation.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Show the maximum memory used during a session:

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

See how much the maximum memory used increased for a computation:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
New in 1
New to Mathematica? Find your learning path »
Have a question? Ask support »