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