From 53b088e60c47655dccbc3a73daedb25ade2509ae Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 20 Dec 2006 10:49:33 +0000 Subject: Make MEMORY_LIMIT and ZEND_USE_MALLOC_MM to be always enabled. They don't make any significant slowdown, but incrise maintainability a lot. Note that the setting of memory_limit wasn't changes (neither in main/main.c nor in php.ini) and it still set to 16M. --- sapi/apache2filter/sapi_apache2.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sapi/apache2filter') diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 0ba545f6ef..cc5091e8d9 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -442,10 +442,10 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) php_struct *ctx; void *conf = ap_get_module_config(f->r->per_dir_config, &php5_module); char *p = get_php_config(conf, "engine", sizeof("engine")); - TSRMLS_FETCH(); zend_file_handle zfd; php_apr_bucket_brigade *pbb; apr_bucket *b; + TSRMLS_FETCH(); if (f->r->proxyreq) { zend_try { @@ -531,14 +531,8 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) php_execute_script(&zfd TSRMLS_CC); -#if MEMORY_LIMIT - { - char *mem_usage; - - mem_usage = apr_psprintf(ctx->r->pool, "%u", zend_memory_peak_usage(1 TSRMLS_CC)); - apr_table_set(ctx->r->notes, "mod_php_memory_usage", mem_usage); - } -#endif + apr_table_set(ctx->r->notes, "mod_php_memory_usage", + apr_psprintf(ctx->r->pool, "%u", zend_memory_peak_usage(1 TSRMLS_CC))); php_apache_request_dtor(f TSRMLS_CC); -- cgit v1.2.1