unity的Profiler類

1、方法GetTotalAllocatedMemoryLong
方法的含義:

// 摘要:
// The total memory allocated by the internal allocators in Unity. Unity reserves
// large pools of memory from the system. This function returns the amount of used
// memory in those pools.
//
// 返回結果:
// The amount of memory allocated by Unity. This returns 0 if the Profiler is not
// available.
unity從系統申請了很多內存池,此函數返回的是,在這些內存池中,使用了多少內存。

2、總共申請的內存:GetTotalReservedMemoryLong

3、未使用的內存:GetTotalUnusedReservedMemoryLong
GetTotalUnusedReservedMemoryLong+GetTotalAllocatedMemoryLong=GetTotalReservedMemoryLong

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章