- Unity 2017 Game Optimization(Second Edition)
- Chris Dickinson
- 288字
- 2021-07-02 23:21:03
The Memory Area
The Memory Area allows us to inspect memory usage of the application in the Breakdown View in the following two modes:
- Simple mode
- Detailed mode
Simple mode provides only a high-level overview of memory consumption of subsystems. This include Unity's low-level Engine, the Mono framework (total heap size that is being watched by the Garbage Collector), graphical assets, audio assets and buffers, and even memory used to store data collected by the Profiler.
Detailed mode shows memory consumption of inpidual GameObjects and MonoBehaviours for both their Native and Managed representations. It also has a column explaining the reason why an object may be consuming memory and when it might be deallocated.
The Garbage Collector is a common feature provided by the various languages Unity supports, which automatically releases any memory we have allocated to store data, but if it is handled poorly it has the potential to stall our application for brief moments. This topic, and many more related topics such as Native and Managed memory spaces, will be explored in Chapter 8, Masterful Memory Management.
Note that information only appears in Detailed mode through manual sampling by clicking on the Take Sample: <TargetName> button. This is the only way to gather information when using Detailed mode, since performing this kind of analysis automatically for each update would be prohibitively expensive.
The Breakdown View also provides a button labelled Gather Object References, which can gather deeper memory information about some objects.
The Memory Area will be a useful tool to use when we pe into the complexities of memory management, Native versus Managed memory, and the Garbage Collector in Chapter 8, Masterful Memory Management.
- Learn TypeScript 3 by Building Web Applications
- 微服務(wù)與事件驅(qū)動架構(gòu)
- CentOS 7 Server Deployment Cookbook
- Java項目實戰(zhàn)精編
- Python算法詳解
- Python網(wǎng)絡(luò)爬蟲技術(shù)與應(yīng)用
- HTML5+CSS3+JavaScript 從入門到項目實踐(超值版)
- Backbone.js Testing
- Python預測分析與機器學習
- INSTANT Premium Drupal Themes
- Java RESTful Web Service實戰(zhàn)
- Arduino Electronics Blueprints
- Selenium自動化測試實戰(zhàn):基于Python
- Visual C++ 2017網(wǎng)絡(luò)編程實戰(zhàn)
- Python for Secret Agents