ChuanXin 发表于 2022-9-22 14:40

Unity MemoryProfiler-Untracked Memory分析

MemoryProfiler官方的解释是:
This stat is calculated as the difference between the results of a query of the Operating System's API's yielded as the amount of memory used by the application according to the OS (The result from this query is also known as the 'Total System Used Memory' counter) and the amount of memory that Unity's systems are tracking as 'used' or 'reserved'.If this stat shows an 'unknown' amount, the captured Unity Player version might not yet have had an implementation of the 'Total System Used Memory' counter, or the tracked categories add up to more than what that counter reveals as in use.The later can happen when some memory that Unity systems reserved or used are not, or not fully, counted as used by the Application, e.g. because the Executable and DLL memory is shared with other Applications or because some of the memory isn't 'dirty' (i.e. modified after being reserved/loaded from a file/allocated but not initialized).
该统计数据计算为操作系统API查询结果与Unity系统跟踪的“已使用”或“保留”内存量之间的差值,该查询结果为应用程序根据操作系统使用的内存量(该查询结果也被称为“总系统使用内存”计数器)。如果此统计数据显示“未知”数量,则捕获的Unity Player版本可能还没有实现“总系统使用内存”计数器,或者跟踪的类别加起来超过了计数器显示的使用情况。当Unity系统保留或使用的某些内存未或未完全计入应用程序使用的内存时,可能会发生后一种情况,例如,因为可执行文件和DLL内存与其他应用程序共享,或者因为某些内存不是“脏的”(即,在从文件/分配/未初始化的情况下保留/加载后修改)。
There are the following gaps in memory tracking that contribute to the amount of Untracked Memory:
- Native Plug-in allocations
- The size of Executable and DLLs on some platforms
- Virtual Machine memory used by IL2CPP
- Application Stack memory
- Memory allocated using Marshal.AllocHGlobal
- Native memory allocated by a Unity subsystems that is not tracked correctly due to a bug
内存跟踪中存在以下差异,这些差异会导致未跟踪内存的数量:
-本地插件分配
-某些平台上可执行文件和DLL的大小
-IL2CPP使用的虚拟机内存
-应用堆栈存储器
-使用Marshal.AllocHGlobal分配的内存
-Unity子系统分配的本机内存由于错误而无法正确跟踪
(Please note that this list depends on the Unity version of the build you made this capture from. Newer versions of Unity may have closed some of these gaps. You can consult the Known Limitations section of the Documentation of Memory Profiler Package's latest version for an updated list.)
(请注意,此列表取决于生成此捕获的Unity版本。较新版本的Unity可能已消除了其中的一些差距。有关更新的列表,请参阅Memory Profiler软件包最新版本文档中的“已知限制”部分。)
To analyze this memory further, you will need to use a platform specific profiler.
要进一步分析此内存,需要使用特定于平台的探查器。
页: [1]
查看完整版本: Unity MemoryProfiler-Untracked Memory分析