Weird memory hogging behavior from Unity 2021.3.45

Hello!

I’m running into a pretty weird issue with a project on Unity 2021.3. Just opening the editor on an empty scene results in Unity.exe allocating and freeing large chunks of memory, filling upwards of 16GB (or half my RAM).

I ran the memory profiler package, and I didn’t get much information other than it’s “Other Native Memory”, and I can’t trace back any reference for the allocated chunks. I’m pretty desperate, and I just hope someone has already solved a similar problem, or for a lightbulb moment.


You can see in this screenshot how the Total Used Memory is rapidly climbing, while all the other memory metrics stay stable.

After installing the Memory Profiler package, opening the Memory Profiler window, not the Profiler window, and take two snapshots while that memory usage grows. Right-click them to go to their folder and copy them to an empty project (e.g. with Unity version 2022 and package version 1.1.1) with the Memory Profiler installed if opening them in the current project would not work well due to the high memory usage. Open them in comparison mode and see where that growth is happening.

The Memory Profiler window should break that “other native memory” usage down by the assets and system you use

Thanks for the help! Unfortunately the results weren’t super helpful

Not for you, but that points at a bug in the engine. Those Unknown > Unknown allocations happen because native code in the engine makes allocations without properly assigning a root that would help attributing that memory and finding the culprit. You might want to file a bug report with that project.