cvs: pecl /apc apc_sma.c
| From: | Rasmus Lerdorf | Date: | Tue, 28 Feb 2006 02:20:49 +0000 |
| Subject: | cvs: pecl /apc apc_sma.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5287@lists.php.net to get a copy of this message | ||
rasmus Tue Feb 28 02:20:49 2006 UTC
Modified files:
/pecl/apc apc_sma.c
Log:
Need to rethink this next fit search offset it looks like. Turn it off
for now to make cvs stable while I play.
http://cvs.php.net/viewcvs.cgi/pecl/apc/apc_sma.c?r1=1.42&r2=1.43&diff_format=u
Index: pecl/apc/apc_sma.c
diff -u pecl/apc/apc_sma.c:1.42 pecl/apc/apc_sma.c:1.43
--- pecl/apc/apc_sma.c:1.42 Tue Feb 28 01:45:55 2006
+++ pecl/apc/apc_sma.c Tue Feb 28 02:20:49 2006
@@ -26,7 +26,7 @@
*/
-/* $Id: apc_sma.c,v 1.42 2006/02/28 01:45:55 rasmus Exp $ */
+/* $Id: apc_sma.c,v 1.43 2006/02/28 02:20:49 rasmus Exp $ */
#include "apc_sma.h"
#include "apc.h"
@@ -127,11 +127,10 @@
/* If it fits perfectly or it fits after a split, stop searching */
if (cur->size == realsize || (cur->size > (sizeof(block_t) + realsize))) {
prvnextfit = prv;
- header->nfoffset = last_offset; /* Next time we search, start at this offset */
break;
}
prv = cur;
- if(wrapped && (prv->next >= header->nfoffset)) break;
+/* if(wrapped && (prv->next >= header->nfoffset)) break; */
last_offset = prv->next;
/* Check to see if we need to wrap around and search from the top */
@@ -146,11 +145,11 @@
return -1;
}
+/* header->nfoffset = last_offset; Next time we search, start at this offset */
+
prv = prvnextfit;
cur = BLOCKAT(prv->next);
- header->nfoffset = last_offset; /* Next time we search, start at this offset */
-
/* update the block header */
header->avail -= realsize;
#if ALLOC_DISTRIBUTION