I want to know this to debug my app. I deeply suspect it's the lack of memory that caused the app crashed. Thanks!
Asked
Active
Viewed 1,338 times
0
-
Post the crash log and we'll have a look what caused the crash. At the moment you are grasping at straws. – Droppy Oct 11 '16 at 08:41
-
You can use xcode, AndroidStudio or Visual Studio based on platform. This will return accurate memory usage as opposed to Profiler which provides Editor usage. – Everts Oct 11 '16 at 09:44
1 Answers
3
You should use the Profiler. Here, the section dedicated to memory.
An extracted from the documentation (Simple mode):
The Simple view shows a simple overview how memory is used throughout Unity in real-time on a per-frame basis. Unity reserves memory pools for allocations in order to avoid asking the operating system for memory too often. This is displayed as a reserved amount, and how much is used.
The areas covered by this are:
- Unity The amount of memory tracked by allocations in native Unity code
- Mono The total heap size and used heap size used by managed code. This memory is garbage-collected
- GfxDriver The estimated amount of memory the driver is using on Textures, render targets, Shaders and Mesh data.
- FMOD The Audio driver’s estimated memory usage
- Profiler Memory used for the Profiler data

Andrea
- 6,032
- 2
- 28
- 55
-
Thanks very much! But actually I want to know the unused memory of the whole system, or the mobile phone, instead of the memory about this application. So do I have some ways to know that(how to code in Unity3d)?:) – Niubility Oct 12 '16 at 06:22
-
I'm very sorry, but I've never accessed it through code. A suggestion, try to look at here: http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c. It's a post related to PerformanceCounter, available on C#. Maybe you could find it useful, I think you can use it on Unity too. Hope this helps ;) – Andrea Oct 13 '16 at 08:33