UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

optimization

[Memory Profiler] Native Reserved Memory Breakdown Not Expanding

Solution

optimizationprofilingdebuggingperformancememory management

Unity 2019.x - Unity 6.3.x

Published Fri, May 1

Issue

 In the Memory Profiler, developers often find that enabling the Reserved Memory Breakdown preference does not reveal details for all categories. Even with the option active, the All Memory tab fails to show expandable rows for anything other than native allocations, leading to confusion regarding actual memory usage.

The Memory Profiler Reserved Memory Breakdown option exclusively targets native reserved memory and does not apply to managed memory types.

Explanation

The observed behavior of the Reserved Memory Breakdown feature within the Memory Profiler is due to its specific application. This option is designed to provide a breakdown exclusively for native reserved memory. Consequently, any attempts to view breakdowns for managed or other types of reserved memory will not yield the expected expandable display in the All Memory tab.

To correctly interpret the profiler output, it is important to understand this distinction. The absence of an expandable breakdown for non-native reserved memory is not an error but a design choice reflecting the scope of the feature. Recent versions of the Memory Profiler include clarifications within the preference settings that explicitly state the option pertains solely to native reserved memory.

  1. Open the Memory Profiler via Window > Analysis > Memory Profiler.

  2. Access the Preferences or Project Settings menu.

  3. Enable the native Reserved Memory Breakdown option.

  4. Capture a snapshot of your project.

Additional Tips:

  • Use the Summary view to compare total native vs managed footprints.

  • Capture snapshots in a development build to get the most accurate native callstacks.


Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.