httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r959392 - in /httpd/httpd/trunk: include/ap_mmn.h include/httpd.h server/config.c
Date Wed, 30 Jun 2010 18:09:07 GMT
Author: sf
Date: Wed Jun 30 18:09:06 2010
New Revision: 959392

URL: http://svn.apache.org/viewvc?rev=959392&view=rev
Log:
To save memory, make module_levels a vector of chars instead of ints.

Modified:
    httpd/httpd/trunk/include/ap_mmn.h
    httpd/httpd/trunk/include/httpd.h
    httpd/httpd/trunk/server/config.c

Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=959392&r1=959391&r2=959392&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Wed Jun 30 18:09:06 2010
@@ -231,12 +231,13 @@
  * 20100609.1 (2.3.7-dev)  Introduce ap_log_cserror()
  * 20100609.2 (2.3.7-dev)  Add deferred write pool to core_output_filter_ctx
  * 20100625.0 (2.3.7-dev)  Add 'userctx' to socache iterator callback prototype
+ * 20100630.0 (2.3.7-dev)  make module_levels vector of char instead of int
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20100625
+#define MODULE_MAGIC_NUMBER_MAJOR 20100630
 #endif
 #define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */
 

Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=959392&r1=959391&r2=959392&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Wed Jun 30 18:09:06 2010
@@ -1172,7 +1172,7 @@ struct server_addr_rec {
 
 struct ap_logconf {
     /** The per-module log levels */
-    int *module_levels;
+    signed char *module_levels;
 
     /** The log level for this server */
     int level;

Modified: httpd/httpd/trunk/server/config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/config.c?rev=959392&r1=959391&r2=959392&view=diff
==============================================================================
--- httpd/httpd/trunk/server/config.c (original)
+++ httpd/httpd/trunk/server/config.c Wed Jun 30 18:09:06 2010
@@ -1374,18 +1374,15 @@ AP_DECLARE_NONSTD(const char *) ap_set_d
 
 AP_DECLARE(void) ap_reset_module_loglevels(struct ap_logconf *l, int val)
 {
-    if (l->module_levels) {
-        int i;
-        for (i = 0; i < conf_vector_length; i++)
-            l->module_levels[i] = val;
-    }
+    if (l->module_levels)
+        memset(l->module_levels, val, conf_vector_length);
 }
 
 AP_DECLARE(void) ap_set_module_loglevel(apr_pool_t *pool, struct ap_logconf *l,
                                         int index, int level)
 {
     if (!l->module_levels) {
-        l->module_levels = apr_palloc(pool, sizeof(int) * conf_vector_length);
+        l->module_levels = apr_palloc(pool, conf_vector_length);
         if (l->level == APLOG_UNSET) {
                 ap_reset_module_loglevels(l, APLOG_UNSET);
         }
@@ -2033,7 +2030,7 @@ AP_DECLARE(struct ap_logconf *) ap_new_l
         l->level = old->level;
         if (old->module_levels) {
             l->module_levels =
-                apr_pmemdup(p, old->module_levels, sizeof(int) * conf_vector_length);
+                apr_pmemdup(p, old->module_levels, conf_vector_length);
         }
     }
     else {



Mime
View raw message