summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-07-18 09:06:33 +0000
committerDmitry Stogov <dmitry@php.net>2006-07-18 09:06:33 +0000
commit29ed52ffa46529dc11d41a919f21b3e8ab32229e (patch)
treeabea71604780b607e44e47609fcae1cc17a4ae8b /sapi
parent7f9a43653c229193b2c181e20150ab108052cea7 (diff)
downloadphp-git-29ed52ffa46529dc11d41a919f21b3e8ab32229e.tar.gz
New memory manager
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/mod_php5.c3
-rw-r--r--sapi/apache2filter/sapi_apache2.c3
-rw-r--r--sapi/apache2handler/sapi_apache2.c2
-rw-r--r--sapi/apache_hooks/mod_php5.c3
4 files changed, 4 insertions, 7 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index dac762fabf..e661fdb4b0 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -684,8 +684,7 @@ static int send_parsed_php(request_rec * r)
char *mem_usage;
TSRMLS_FETCH();
- mem_usage = ap_psprintf(r->pool, "%u", AG(allocated_memory_peak));
- AG(allocated_memory_peak) = 0;
+ mem_usage = ap_psprintf(r->pool, "%u", zend_memory_peak_usage(TSRMLS_C));
ap_table_setn(r->notes, "mod_php_memory_usage", mem_usage);
}
#endif
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 9001b2ad6f..4e7c61411c 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -526,8 +526,7 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
{
char *mem_usage;
- mem_usage = apr_psprintf(ctx->r->pool, "%u", AG(allocated_memory_peak));
- AG(allocated_memory_peak) = 0;
+ mem_usage = apr_psprintf(ctx->r->pool, "%u", zend_memory_peak_usage(TSRMLS_C));
apr_table_set(ctx->r->notes, "mod_php_memory_usage", mem_usage);
}
#endif
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 4938702c1d..f2c4956e8b 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -598,7 +598,7 @@ zend_first_try {
{
char *mem_usage;
- mem_usage = apr_psprintf(ctx->r->pool, "%u", AG(allocated_memory_peak));
+ mem_usage = apr_psprintf(ctx->r->pool, "%u", zend_memory_peak_usage(TSRMLS_C));
apr_table_set(r->notes, "mod_php_memory_usage", mem_usage);
}
#endif
diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c
index 55e02a4bdc..5ef0181e7d 100644
--- a/sapi/apache_hooks/mod_php5.c
+++ b/sapi/apache_hooks/mod_php5.c
@@ -742,8 +742,7 @@ static int send_parsed_php(request_rec * r)
char *mem_usage;
TSRMLS_FETCH();
- mem_usage = ap_psprintf(r->pool, "%u", AG(allocated_memory_peak));
- AG(allocated_memory_peak) = 0;
+ mem_usage = ap_psprintf(r->pool, "%u", zend_memory_peak_usage(TSRMLS_C));
ap_table_setn(r->notes, "mod_php_memory_usage", mem_usage);
}
#endif