httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r774498 - /httpd/httpd/trunk/modules/mem/mod_sharedmem.c
Date Wed, 13 May 2009 19:21:47 GMT
Author: jim
Date: Wed May 13 19:21:44 2009
New Revision: 774498

URL: http://svn.apache.org/viewvc?rev=774498&view=rev
Log:
no need to recalc... we store this.

Modified:
    httpd/httpd/trunk/modules/mem/mod_sharedmem.c

Modified: httpd/httpd/trunk/modules/mem/mod_sharedmem.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_sharedmem.c?rev=774498&r1=774497&r2=774498&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/mod_sharedmem.c (original)
+++ httpd/httpd/trunk/modules/mem/mod_sharedmem.c Wed May 13 19:21:44 2009
@@ -218,7 +218,7 @@
     }
 
     ptr = mem->base;
-    inuse = ptr + (mem->size * mem->num);
+    inuse = mem->inuse;
     SLOTMEM_LOCK(mem->smutex);
     for (i = 0; i < mem->num; i++, inuse++) {
         if (*inuse) {
@@ -456,7 +456,7 @@
         return APR_ENOSHMAVAIL;
     }
 
-    inuse = (slot->base + (slot->size * slot->num));
+    inuse = slot->inuse;
     if (id >= slot->num || !inuse[id] ) {
         return APR_NOTFOUND;
     }
@@ -479,7 +479,7 @@
         return APR_ENOSHMAVAIL;
     }
 
-    inuse = (slot->base + (slot->size * slot->num));
+    inuse = slot->inuse;
     if (id >= slot->num || !inuse[id] ) {
         return APR_NOTFOUND;
     }
@@ -511,7 +511,7 @@
         return APR_ENOSHMAVAIL;
     }
 
-    inuse = (slot->base + (slot->size * slot->num));
+    inuse = slot->inuse;
 
     SLOTMEM_LOCK(slot->smutex);
     for (i = 0; i < slot->num; i++, inuse++) {
@@ -538,7 +538,7 @@
         return APR_ENOSHMAVAIL;
     }
 
-    inuse = (slot->base + (slot->size * slot->num));
+    inuse = slot->inuse;
 
     SLOTMEM_LOCK(slot->smutex);
     if (id >= slot->num || !inuse[id] ) {



Mime
View raw message