/** * DebugDisplayItemMemory * Display the memory being used * @author Zeh * @version 1.0 */ package com.zehfernando.display.debug { import flash.system.*; public class DebugDisplayItemMemory extends DebugDisplayItem { // Constants protected static const MAX_MEMORY:Number = 64; // Max projected memory in mb public function DebugDisplayItemMemory() { super(); } override protected function update(timePassed:uint, includeInterval:Boolean = false): void { timePassed; var mem:Number = System.totalMemory / 1024 / 1024; caption.text = String((Math.floor(mem*10)/10) + "mb"); timeGraph.push(mem / MAX_MEMORY, includeInterval); } } }