Detailed of "Untracked Memory"

Hello.
As a result of memory profiling, “Untracked Memory” exceeded 60% of the total memory.
I’d like to know the breakdown of this,
but I can’t find the explanation in the documentation.
Could you please tell me what is included?

Hello,
The information is in the list of Known Limitations:

But the next update is going to bring that information into the window itself, to be shown when the corresponding bar is selected :slight_smile:
Also, we are working on closing tracking gaps so the list will get shorter but that will depend on the base Editor version and not the package.

We will update the package documentation accordingly but that will only affect the latest versions of the documentation so the best source for this information is always going to be the documentation for the latest version of the package :slight_smile:

2 Likes

Also, you have a snapshot there that suffers from a bug in the managed crawler in the package, which is why the Managed Object memory size is Unknown. That should be fixed with the next update.

That also likely explains why System.Object is claiming to take up 3 GB
If the next update does not fix this, please report a bug. We only need the snapshot to reproduce this, no project :slight_smile:

1 Like

Actually… The bugs I fixed were around string memory parsing causing some overflow. I’m not certain that the issue seen in your screenshot is fixed with that.

Could you please file a bug report via the Editor’s menu bar: Help > Report a Bug?
I don’t need the project, just the snapshot and the Issue ID that you should get from the response email.
With that I can make sure this is fixed asap, either with the next release or a quick follow up release.

1 Like

Hi, when you say “It’s going to be brought into the window itself” do you mean just that that list will let the user know what “Untracked memory” consists of or do you mean that we’ll see specifics such as:

20% Native Plugin Allocations
20% Size of DLL’s
40% IL2CPP
etc…

Like how specific are we talking here? Because I’ve also begun to run into the OP’s problem and if it’s super vague in the next update, that’s not going to be very helpful.

The update, 0.5.0-preview.1, which is now released just brings the description to the UI.

Reducing this category by filling the blank spaces with info will happen gradually and with updates to the base Unity Editor and Player, not via a package update.

Getting data for IL2CPP Virtual Machine memory is in the works for 2022.2. I’m unsure if that will be backported.

Allowing Plugins to register their memory via Unity’s Memory manager is in the works too. Once that’s implemented, it will depend on plug-in creators to actually use that API or their memory will remain untracked.

Size of DLLs for all platforms is also in the works.

Until this work is done and shipped, the only thing you can do to see more about these is to use native platform specific profilers.

@MartinTilo Hi bro. One more question. How do Unity Catergorize the memory alloc with “kMemTempAlloc”. I mean it’s temporary of course, but it can results in enlarge the overall memory consumption. So how do unity visualize them in profiler?

Other Native Memory (In use / Reserved)
or
Untracked Memory

thx

Every allocation made with Unity’s allocators is practically per definition tracked. So this would show up under other. It should be listed in a bit more detail in the All Of Memory tables in the 1.0 version, but for temp memory I think it only shows the Temp Allocator size.

Hi @MartinTilo .

Kind of on that note, i’m pretty much facing a memory issue and i’m trying to get to the bottom of what might be triggering it. On my main project i’m having a problem where my lit.shader increases with RAM as soon as a scene is added into addressables. Even if the scene is not loaded.

I am trying to reproduce it on a new project, and although i am unable to see the similar behavior on the lit shader i am seeing memory that i’m unable to identify as soon as i add a scene into the addressables.

Here is a screenshot. It says that 278 MB is tracked. But in the breakdown only 104.9 is seen. Am i misunderstanding the tool? Thanks! This is fairly easy to replicate as i already have a reproducible repository. And its only just 1 scene with some fbxes and materials.

It’s on unity 2022.1.23f1. *edit that my memory profiler is only 0.7 because my unity is not 2022.2 yet, let me update asap and update again if there is any difference.

That’s the Unity Objects Breakdown which is a filtered view showing only the memory used for types inheriting from UnityEngine.Object.

You can open the Objects and Allocations page or load that snapshot into the memory Profiler in an empty project using Unity 2022.2 and the 1.0 of the package and explore the All Off Memory page to see all of that memory usage.

Also there are ongoing efforts to reduce the impact of shader variants and having an explosion of shader variants duplicated into memory when shaders are included in multiple Asset Bundles. There’s other threads in the forums with details and updates on that.

thanks i saw that there are posts on the variable shaders loading and things like that but somehow hasn’t been fully working when i tried it. For now… i’m kind of staying away from URP-Lit which is mostly the crazy one . . . but either way, my models seems to be picking up urp-interactive-autodesk which dosen’t seem to go nuts for the moment… but closely monitoring.

1 Like

For me, it was RenderTexture s that were causing this.

Just to add on this note - RenderTextures should be properly tracked as of 2023.1.0b6 and 2023.2.0a3, with the exception of Vulkan MSAA RTs (landed in 2023.2.0a6 and coming to 23.1 soon) :slight_smile:

2 Likes

What isn’t properly tracked about render textures in older versions of unity? I’m having an issue where >3GB of memory is showing up as untracked in the Memory profiler and I’m trying to figure out how that’s possible, I’m on unity 2022.2.15 w/ Mono though, but there is a section for render textures in the UI that shows their memory usage so I’m not sure what is/isn’t included in that.
Edit: I am also not using any Native Plugins

It’ll vary depending on platform, API etc… but, hopefully you shouldn’t have to worry about it: We backported the RT fixes to 2022.2.16f1, which, given how close a version you’re on, should be an easy upgrade! Or at the very least, worth trying just to see how memory compares.

1 Like

i must say that my memory issues were solved from 2022 onwards. Particularly the crazy lit memory overdose.
Currently am on 2022.1.23f1

1 Like

Awesome! I will try updating

1 Like

don’t you face untracked memory problem when loading and unloading anymore right now?