修正debug类的getUserMem方法

This commit is contained in:
thinkphp
2016-07-01 14:08:48 +08:00
parent 2d85cf4a7f
commit 1c38198a3b

View File

@@ -104,7 +104,7 @@ class Debug
*/ */
public static function getUseMem($dec = 2) public static function getUseMem($dec = 2)
{ {
$size = memory_get_usage() - START_MEM; $size = memory_get_usage() - THINK_START_MEM;
$a = ['B', 'KB', 'MB', 'GB', 'TB']; $a = ['B', 'KB', 'MB', 'GB', 'TB'];
$pos = 0; $pos = 0;
while ($size >= 1024) { while ($size >= 1024) {