diff options
author | Stefan Fritsch <sf@apache.org> | 2010-06-30 20:09:06 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2010-06-30 20:09:06 +0200 |
commit | cd6924b0863a69a606c94f39e9407131e45f65b4 (patch) | |
tree | 8434d425bc59038ee4a5b71ae3297d774bef6626 /server | |
parent | Move new_api_2_4 doc to developer docs where it belongs (diff) | |
download | apache2-cd6924b0863a69a606c94f39e9407131e45f65b4.tar.xz apache2-cd6924b0863a69a606c94f39e9407131e45f65b4.zip |
To save memory, make module_levels a vector of chars instead of ints.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@959392 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r-- | server/config.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/server/config.c b/server/config.c index 7c0430d5bc..9e609a57a5 100644 --- a/server/config.c +++ b/server/config.c @@ -1374,18 +1374,15 @@ AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd, 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_log_config(apr_pool_t *p, 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 { |