Make zend_memory_peak_usage() to be avalable even without --enable-memory-limit

This commit is contained in:
Dmitry Stogov 2006-10-12 06:47:04 +00:00
parent 3df7420fed
commit b907cd59d5
2 changed files with 4 additions and 4 deletions

View File

@ -1850,16 +1850,18 @@ ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC)
}
}
#if MEMORY_LIMIT
ZEND_API size_t zend_memory_peak_usage(int real_usage TSRMLS_DC)
{
#if MEMORY_LIMIT
if (real_usage) {
return AG(mm_heap)->real_peak;
} else {
return AG(mm_heap)->peak;
}
}
#else
return 0;
#endif
}
ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)

View File

@ -119,10 +119,8 @@ void zend_debug_alloc_output(char *format, ...);
#define full_mem_check(silent)
#endif
#if MEMORY_LIMIT
ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC);
ZEND_API size_t zend_memory_peak_usage(int real_usage TSRMLS_DC);
#endif
END_EXTERN_C()