Ejemplo n.º 1
0
        public static int Monitoring()
        {
            int num = 0;

            for (int i = 0; i < MemoryCollection.CollectionTypes.Length; i++)
            {
                int num2 = MemoryCollection._Collection(MemoryCollection.Mode.Monitoring, ref MemoryCollection.m_Collections[i].items, new Type[]
                {
                    MemoryCollection.CollectionTypes[i]
                });
                num += num2;
                MemoryCollection.m_Collections[i].collectedSize = num2;
                MemoryCollection.m_Collections[i].Sort();
            }
            return(num);
        }
Ejemplo n.º 2
0
        public static void Print(MemoryCollection.Mode mode)
        {
            int num = 0;

            for (int i = 0; i < MemoryCollection.CollectionTypes.Length; i++)
            {
                num += MemoryCollection._Collection(mode, ref MemoryCollection.m_Collections[i].items, new Type[]
                {
                    MemoryCollection.CollectionTypes[i]
                });
            }
            string text = string.Format("Total memory size = {0} bytes", (num != 0) ? num.ToString("#,###,###,###") : "<<unknwon>>");

            NrTSingleton <NrDebugConsole> .Instance.Print(text);

            TsLog.Log(text, new object[0]);
        }