Mathematica > Core Language > Tuning & Debugging > Memory Measurement & Optimization > MemoryInUse >
Mathematica > Systems Interfaces & Deployment > Mathematica Sessions > Mathematica Session Information > Memory Measurement & Optimization > MemoryInUse >

MemoryInUse

MemoryInUse
gives the number of bytes currently being used to store all data in the current Mathematica kernel session.
MemoryInUse[$FrontEnd]
gives the number of bytes used in the Mathematica front end.
Current memory use in the kernel:
Storing a million elements of takes additional memory:
Current memory use in the front end:
Current memory use in the kernel:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Storing a million elements of takes additional memory:
In[3]:=
Click for copyable input
Out[3]=
 
Current memory use in the front end:
In[1]:=
Click for copyable input
Out[1]=
Even though there is no visible output, the result is still assigned to Out, so memory is used:
Add an expression after the to prevent the large result being assigned to Out:
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF