diff -r ec90736b9cb9 -r ceff43bbc3d3 includes/functions.php --- a/includes/functions.php Mon Feb 18 16:27:28 2008 -0500 +++ b/includes/functions.php Mon Feb 18 16:28:27 2008 -0500 @@ -4024,8 +4024,13 @@ $_profiler[] = array( 'point' => 'Profiling started', 'time' => microtime_float(), - 'backtrace' => false + 'backtrace' => false, + 'mem' => false ); + if ( function_exists('memory_get_usage') ) + { + $_profiler[ count($_profiler) - 1 ]['mem'] = memory_get_usage(); + } } /** @@ -4048,8 +4053,13 @@ $_profiler[] = array( 'point' => $point, 'time' => microtime_float(), - 'backtrace' => $backtrace + 'backtrace' => $backtrace, + 'mem' => false ); + if ( function_exists('memory_get_usage') ) + { + $_profiler[ count($_profiler) - 1 ]['mem'] = memory_get_usage(); + } } /** @@ -4114,6 +4124,14 @@ $html .= '' . "\n"; } + if ( $entry['mem'] ) + { + $html .= '' . "\n"; + $html .= ' Total mem usage:' . "\n"; + $html .= ' ' . htmlspecialchars($entry['mem']) . ' (bytes)' . "\n"; + $html .= '' . "\n"; + } + $html .= "\n"; $time_last = $entry['time'];