MaxMemoryUsed

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

MaxMemoryUsed[expr]
gives the maximum number of bytes used during the evaluation of expr.

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]=
Introduced in 1988
(1.0)