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.


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.
Details

- 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.
See Also
MemoryInUse ByteCount MemoryAvailable MemoryConstrained
Function Repository: TimeMemoryUsed EchoPerformance
Tech Notes
Related Guides
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), MaxMemoryUsed, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxMemoryUsed.html.
CMS
Wolfram Language. 1988. "MaxMemoryUsed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MaxMemoryUsed.html.
APA
Wolfram Language. (1988). MaxMemoryUsed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MaxMemoryUsed.html
BibTeX
@misc{reference.wolfram_2025_maxmemoryused, author="Wolfram Research", title="{MaxMemoryUsed}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/MaxMemoryUsed.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_maxmemoryused, organization={Wolfram Research}, title={MaxMemoryUsed}, year={1988}, url={https://reference.wolfram.com/language/ref/MaxMemoryUsed.html}, note=[Accessed: 08-August-2025]}