diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 461a700c89..33dd4f2295 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1736,6 +1736,16 @@ function page_footer() if ($auth->acl_get('a_')) { + if (function_exists('memory_get_usage')) + { + if ($memory_usage = memory_get_usage()) + { + $memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . $user->lang['MB'] : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . $user->lang['KB'] : $memory_usage . ' ' . $user->lang['BYTES']); + + $debug_output .= ' | Memory Usage: ' . $memory_usage; + } + } + $debug_output .= ' | Explain'; } }