You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2009/05/13 21:21:47 UTC

svn commit: r774498 - /httpd/httpd/trunk/modules/mem/mod_sharedmem.c

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] ) {