[memcached] sgrimm, r461: Fix an off-by-one error in the multithre...

commits at code.sixapart.com commits at code.sixapart.com
Fri Mar 2 03:44:59 UTC 2007


Fix an off-by-one error in the multithreaded version's message passing code.


U   branches/multithreaded/server/ChangeLog
U   branches/multithreaded/server/thread.c


Modified: branches/multithreaded/server/ChangeLog
===================================================================
--- branches/multithreaded/server/ChangeLog	2007-01-19 16:30:12 UTC (rev 460)
+++ branches/multithreaded/server/ChangeLog	2007-03-02 03:44:59 UTC (rev 461)
@@ -1,3 +1,7 @@
+2007-03-01
+	* Steven Grimm <sgrimm at facebook.com>: Fix an off-by-one error in the
+	  multithreaded version's message passing code.
+
 2006-11-22
 	* Steven Grimm <sgrimm at facebook.com>: Add support for multithreaded
 	  execution. Run configure with "--enable-threads" to enable. See

Modified: branches/multithreaded/server/thread.c
===================================================================
--- branches/multithreaded/server/thread.c	2007-01-19 16:30:12 UTC (rev 460)
+++ branches/multithreaded/server/thread.c	2007-03-02 03:44:59 UTC (rev 461)
@@ -169,7 +169,7 @@
          * (which we'll return to the caller) for placement on
          * the freelist.
          */
-        for (i = 2; i < ITEMS_PER_ALLOC - 1; i++)
+        for (i = 2; i < ITEMS_PER_ALLOC; i++)
             item[i - 1].next = &item[i];
 
         pthread_mutex_lock(&cqi_freelist_lock);




More information about the memcached-commits mailing list