# GetTotalAllocatedMemory()

> Returns the amount of allocated and used system memory.

## Definition

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

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

```csharp
public static uint GetTotalAllocatedMemory()
```

### Returns

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

### Remarks

The game uses the amount of memory returned by [Profiler.GetTotalAllocatedMemory](/engine/6000.5/script-reference/unityengine/profiling/profiler/gettotalallocatedmemory.md). As GameObjects are instantiated and other GameObjects loaded or created, the value returned increases, showing that more memory is being used.

Additional Resources: [Profiler.GetTotalUnusedReservedMemory](/engine/6000.5/script-reference/unityengine/profiling/profiler/gettotalunusedreservedmemory.md), [Profiler.GetTotalReservedMemory](/engine/6000.5/script-reference/unityengine/profiling/profiler/gettotalreservedmemory.md).
