1、iOS進程中使用的內存ios
1)內存的類型app
Physical Memory Wired—The amount of memory being used by the operating system. Physical Memory Active—The amount of memory being used by processes other than the operating system. Physical Memory Inactive—The amount of memory that was recently released. Physical Memory Used—The total amount of memory that was used while performing the sample. Physical Memory Free—The amount of available memory. Total VM Size—The total size of virtual memory. VM Page In Bytes—The amount of memory calls sent to RAM. VM Page Out Bytes—The amount of memory calls sent to disk. VM Swap Used—The amount of memory called from disk.
2)Xcode 自帶的Instruments工具可以監測到下面幾種類型工具
The ObjectAlloc instrument records and displays a history of all memory allocations since the launch of your application. The Leaks instrument looks for allocated memory that is no longer referenced by your program’s code; see Finding Leaks Using Instruments. The Shared Memory instrument monitors the opening and unlinking of shared memory regions. The Memory Monitor instrument measures and records the system’s overall memory usage.
一般代碼中OC的對象生成釋放,c、C++對象的生成釋放,malloc和free都能被監控code
2、直播助手在排查內存問題時卻遇到一個奇怪的問題orm
Instruments工具記錄沒有內存泄漏,Xcode 顯示內存從70MB到90MB,在網上搜索以後,獲得下面的答案對象
3、結論blog
1)Xcode自帶的內存監控工具的內存數據能夠說是錯誤的,要以Instruments工具爲準進程
https://stackoverflow.com/questions/28321954/ios-memory-usage-increasing-cant-find-the-culprit/28566113#28566113內存