diff options
author | Urban Müller | 2011-09-06 16:51:23 +0000 |
---|---|---|
committer | Urban Müller | 2011-09-06 16:51:23 +0000 |
commit | bb113f3bc0d451fa33af8b4ea9635d08e6df91a0 (patch) | |
tree | 5c8950a3ae1195d7226876cff11c06273a1a7ed2 | |
parent | ef285366954231a28bff1428b5f71c4e284dd46d (diff) | |
download | itools-bb113f3bc0d451fa33af8b4ea9635d08e6df91a0.tar.gz itools-bb113f3bc0d451fa33af8b4ea9635d08e6df91a0.tar.bz2 itools-bb113f3bc0d451fa33af8b4ea9635d08e6df91a0.zip |
print err if stackdump not possible
-rw-r--r-- | it_debug.class | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/it_debug.class b/it_debug.class index 2ccf734..0b14cc7 100644 --- a/it_debug.class +++ b/it_debug.class @@ -182,7 +182,9 @@ function backtrace($p = array()) $p += array('levels' => 0, 'skiplevels'=> 0, 'skipfiles' => "###"); - if (!function_exists('memory_get_usage') || (memory_get_usage() < 50000000)) + if (function_exists('memory_get_usage') && (memory_get_usage() > 50000000)) + $result = array("[mem usage too high]"); + else { foreach (array_slice(debug_backtrace(), $p['skiplevels'] + 1) as $call) { |