Exemplo n.º 1
0
        //=========================================
        // timer1_Tick
        //=========================================
        private void timer1_Tick(object sender, EventArgs e)
        {
            int numHeaps = AllocStats.getNumHeaps();

            //ask the manager what our heap sizes are.
            for (int i = 0; i < numHeaps; i++)
            {
                HeapAlloc pHeap = AllocStats.getHeapFromIndex(i);

                uint allocSize = pHeap.getTotalAllocatedBytes();
                //covert the Y value to megabytes for graphing.
                int yMB = (int)(allocSize / (1024 * 1024));
                fastTimeLine.addPointToLine(pHeap.getMemPtr(), (int)yMB);
            }


            //elapsed time
            TimeSpan deltaTime = DateTime.Now - mStartTime;

            label2.Text = "Time Line [" + deltaTime.Hours + ":" + deltaTime.Minutes + ":" + deltaTime.Seconds + "]";

            if (mScrollerStuck)
            {
                fastTimeLine.setScrollPercent(1);
            }


            fastTimeLine.Refresh();
        }
Exemplo n.º 2
0
        //=========================================
        // onHeapRegister
        //=========================================
        public void onHeapRegister(uint mPtr, int flags, string name)
        {
            HeapAlloc pHeap = AllocStats.getHeapFromBasePtr(mPtr);

            fastTimeLine.addNewGraphLine(pHeap.getMemPtr(), pHeap.getName(), pHeap.ColorVal);
        }