# GetMonoHeapSize()

> Returns the size of the mono heap.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Profiling](/engine/6000.6/script-reference/unityengine/profiling.md)
* **Assembly:** UnityEngine.CoreModule

> **Warning:**
>
> **Deprecated.** GetMonoHeapSize has been deprecated since it is limited to 4GB. Please use GetMonoHeapSizeLong() instead.

```csharp
public static uint GetMonoHeapSize()
```

### Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### Remarks

This is the reserved system memory that Mono is using for allocations.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Profiling;

public class Example : MonoBehaviour
{
    void Update()
    {
        #if ENABLE_PROFILER
        Debug.Log("Allocated Mono heap size" + Profiler.GetMonoHeapSize() + "Bytes");
        #endif
    }
}
```
