---
title: "Memory Usage"
canonical: "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/InputOutput/system-calls.html"
source: "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/InputOutput/system-calls.md"
part: "The Magma Language"
chapter: "Input and Output"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "The Magma Language", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/index-magma-language.md"}
  - {"title": "Input and Output", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/InputOutput/index-input-output.md"}
prev: {"title": "Logging a Session", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/InputOutput/logging.md"}
next: {"title": "System Calls", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/InputOutput/system-calls-2.md"}
intrinsics:
  - {"name": "GetMemoryUsage", "signature": "GetMemoryUsage() -> RngIntElt"}
  - {"name": "GetMaximumMemoryUsage", "signature": "GetMaximumMemoryUsage() -> RngIntElt"}
  - {"name": "ResetMaximumMemoryUsage", "signature": "ResetMaximumMemoryUsage()"}
---

# Memory Usage

<a id="function-getmemoryusage"></a>
## `GetMemoryUsage() -> RngIntElt`

Return the current memory usage of Magma (in bytes as an integer). This is the process data size, which does not include the executable code.

<a id="function-getmaximummemoryusage"></a>
## `GetMaximumMemoryUsage() -> RngIntElt`

Return the maximum memory usage of Magma (in bytes as an integer) which has been attained since last reset (see `ResetMaximumMemoryUsage`). This is the maximum process data size, which does not include the executable code.

<a id="procedure-resetmaximummemoryusage"></a>
## `ResetMaximumMemoryUsage()`

Reset the value of the maximum memory usage of Magma to be the current memory usage of Magma (see `GetMaximumMemoryUsage`).
