cvs: ZendEngine2(PHP_5_2) / zend_alloc.c zend_alloc.h
| From: | Dmitry Stogov | Date: | Thu, 12 Oct 2006 06:46:52 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_alloc.c zend_alloc.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5322@lists.php.net to get a copy of this message | ||
dmitry Thu Oct 12 06:46:52 2006 UTC
Modified files: (Branch: PHP_5_2)
/ZendEngine2 zend_alloc.c zend_alloc.h
Log:
Make zend_memory_peak_usage() to be avalable even without --enable-memory-limit
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.144.2.3.2.11&r2=1.144.2.3.2.12&diff_format=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.144.2.3.2.11 ZendEngine2/zend_alloc.c:1.144.2.3.2.12
--- ZendEngine2/zend_alloc.c:1.144.2.3.2.11 Sat Sep 30 17:12:06 2006
+++ ZendEngine2/zend_alloc.c Thu Oct 12 06:46:51 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c,v 1.144.2.3.2.11 2006/09/30 17:12:06 iliaa Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.3.2.12 2006/10/12 06:46:51 dmitry Exp $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -1808,16 +1808,18 @@
}
}
-#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)
{
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.h?r1=1.63.2.2.2.4&r2=1.63.2.2.2.5&diff_format=u
Index: ZendEngine2/zend_alloc.h
diff -u ZendEngine2/zend_alloc.h:1.63.2.2.2.4 ZendEngine2/zend_alloc.h:1.63.2.2.2.5
--- ZendEngine2/zend_alloc.h:1.63.2.2.2.4 Thu Oct 5 08:08:57 2006
+++ ZendEngine2/zend_alloc.h Thu Oct 12 06:46:51 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.h,v 1.63.2.2.2.4 2006/10/05 08:08:57 dmitry Exp $ */
+/* $Id: zend_alloc.h,v 1.63.2.2.2.5 2006/10/12 06:46:51 dmitry Exp $ */
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
@@ -108,10 +108,8 @@
#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()