httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1060112 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.h mod_proxy_balancer.c
Date Mon, 17 Jan 2011 22:16:51 GMT
Author: rjung
Date: Mon Jan 17 22:16:51 2011
New Revision: 1060112

URL: http://svn.apache.org/viewvc?rev=1060112&view=rev
Log:
Align proxy_worker_shared in slotmem shm
using default APR alignment.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy.h
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?rev=1060112&r1=1060111&r2=1060112&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Mon Jan 17 22:16:51 2011
@@ -336,6 +336,8 @@ typedef struct {
     unsigned int     disablereuse_set:1;
 } proxy_worker_shared;
 
+#define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
+
 /* Worker configuration */
 struct proxy_worker {
     int             index;      /* shm array index */

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1060112&r1=1060111&r2=1060112&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Mon Jan 17 22:16:51 2011
@@ -753,11 +753,12 @@ static int balancer_post_config(apr_pool
 
             ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Doing create: %s (%s), %d, %d",
                          balancer->name, balancer->sname,
-                         (int)sizeof(proxy_worker_shared),
+                         (int)ALIGNED_PROXY_WORKER_SHARED_SIZE,
                          (int)balancer->max_workers);
 
-            rv = storage->create(&new, balancer->sname, sizeof(proxy_worker_shared),
-                            balancer->max_workers, AP_SLOTMEM_TYPE_PREGRAB, pconf);
+            rv = storage->create(&new, balancer->sname,
+                                 ALIGNED_PROXY_WORKER_SHARED_SIZE,
+                                 balancer->max_workers, AP_SLOTMEM_TYPE_PREGRAB, pconf);
             if (rv != APR_SUCCESS) {
                 ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "slotmem_create failed");
                 return !OK;



Mime
View raw message