iliaa           Mon Dec 30 18:45:19 2002 EDT

  Modified files:              
    /php4/sapi/apache2filter    sapi_apache2.c 
  Log:
  Fixed bug #21045 (Apache 2 SAPI now supports the mod_php_memory_usage 
  log variable that allows users to log the memory usage of their PHP scripts).
  
  
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.98 
php4/sapi/apache2filter/sapi_apache2.c:1.99
--- php4/sapi/apache2filter/sapi_apache2.c:1.98 Fri Dec 27 14:59:09 2002
+++ php4/sapi/apache2filter/sapi_apache2.c      Mon Dec 30 18:45:18 2002
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: sapi_apache2.c,v 1.98 2002/12/27 19:59:09 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.99 2002/12/30 23:45:18 iliaa Exp $ */
 
 #include <fcntl.h>
 
@@ -498,6 +498,15 @@
                                zfd.opened_path = NULL;
 
                                php_execute_script(&zfd TSRMLS_CC);
+#ifdef MEMORY_LIMIT
+                               {
+                                       char *mem_usage;
+ 
+                                       mem_usage = apr_psprintf(ctx->r->pool, "%u", 
+AG(allocated_memory_peak));
+                                       AG(allocated_memory_peak) = 0;
+                                       apr_table_set(ctx->r->notes, 
+"mod_php_memory_usage", mem_usage);
+                               }
+#endif
                        } else { 
                                zend_syntax_highlighter_ini syntax_highlighter_ini;
                                



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to