mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Make zend_memory_peak_usage() to be avalable even without --enable-memory-limit
This commit is contained in:
parent
8b8eb2cf88
commit
e6fd66facb
2 changed files with 4 additions and 4 deletions
|
@ -1808,16 +1808,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)
|
||||
{
|
||||
|
|
|
@ -108,10 +108,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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue