From caa32edf6ff91144c6dd277a04e6e10d7c8bc3f8 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 30 Mar 2013 19:33:05 +0100 Subject: [PATCH] Get REAL memory usage, not allocated --- src/PocketMinecraftServer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 2bf581045..161daa5e9 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -100,7 +100,7 @@ class PocketMinecraftServer{ public function titleTick(){ if(ENABLE_ANSI === true){ - echo "\x1b]0;PocketMine-MP ".MAJOR_VERSION." | Online ". count($this->clients)." | RAM ".round((memory_get_usage(true) / 1024) / 1024, 2)."MB | TPS ".$this->getTPS()."\x07"; + echo "\x1b]0;PocketMine-MP ".MAJOR_VERSION." | Online ". count($this->clients)." | RAM ".round((memory_get_usage() / 1024) / 1024, 2)."MB | TPS ".$this->getTPS()."\x07"; } } @@ -150,7 +150,7 @@ class PocketMinecraftServer{ public function debugInfo($console = false){ $info = array(); $info["tps"] = $this->getTPS(); - $info["memory_usage"] = round((memory_get_usage(true) / 1024) / 1024, 2)."MB"; + $info["memory_usage"] = round((memory_get_usage() / 1024) / 1024, 2)."MB"; $info["memory_peak_usage"] = round((memory_get_peak_usage(true) / 1024) / 1024, 2)."MB"; $info["entities"] = $this->query("SELECT count(EID) as count FROM entities;", true); $info["entities"] = $info["entities"]["count"];