Changed memory_get_usage() and memory_get_peak_usage(). Optional boolean argument allows get memory size allocated by emalloc() (by default) or real size of memory allocated from system.

This commit is contained in:
Dmitry Stogov 2006-07-25 13:41:08 +00:00
parent e05efeaff5
commit 61d39cf1c1
7 changed files with 80 additions and 30 deletions

View file

@ -593,7 +593,7 @@ zend_first_try {
{
char *mem_usage;
mem_usage = apr_psprintf(ctx->r->pool, "%u", zend_memory_peak_usage(TSRMLS_C));
mem_usage = apr_psprintf(ctx->r->pool, "%u", zend_memory_peak_usage(1 TSRMLS_CC));
apr_table_set(r->notes, "mod_php_memory_usage", mem_usage);
}
#endif