From 6e8eeea3bce5bee736e5ad4fdca87d785ac78337 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Sun, 24 Nov 2013 07:28:54 +0000 Subject: [PATCH] add memory usage info to print --- phpdbg_prompt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index a065b8fd61..552a8bc846 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -729,11 +729,16 @@ PHPDBG_COMMAND(print) /* {{{ */ if (EG(in_execution)) { phpdbg_writeln("VM Return\t%d", PHPDBG_G(vmret)); } + phpdbg_writeln("Classes\t\t%d", zend_hash_num_elements(EG(class_table))); phpdbg_writeln("Functions\t%d", zend_hash_num_elements(EG(function_table))); phpdbg_writeln("Constants\t%d", zend_hash_num_elements(EG(zend_constants))); phpdbg_writeln("Included\t%d", zend_hash_num_elements(&EG(included_files))); - + phpdbg_writeln( + "Memory\t\t%.3f/%.3f (kB)", + (float) (zend_memory_usage(1 TSRMLS_CC)/1024), + (float) (zend_memory_usage(0 TSRMLS_CC)/1024)); + phpdbg_print_breakpoints(PHPDBG_BREAK_FILE TSRMLS_CC); phpdbg_print_breakpoints(PHPDBG_BREAK_SYM TSRMLS_CC); phpdbg_print_breakpoints(PHPDBG_BREAK_METHOD TSRMLS_CC); -- 2.50.1