Branch: refs/heads/master
Home: http://github.com/memcached/memcached
Commit: fbe752c9fda9629c1d79e3191570a32e8bcd45f4
http://github.com/memcached/memcached/commit/fbe752c9fda9629c1d79e3191570a32e8bcd45f4
Author: Mat Hostetter <[email protected]>
Date: 2009-09-10 (Thu, 10 Sep 2009)
Changed paths:
M items.c
Log Message:
-----------
Clean up slab boundary checking.
http://groups.google.com/group/memcached/browse_thread/thread/45b70cced2c4bd32
In items.c in memcached-1.2.8, these arrays allow indices up to but
not including LARGEST_ID:
...
static item *heads[LARGEST_ID];
static item *tails[LARGEST_ID];
So this comment (which appears twice) is confused:
/* always true, warns: assert(it->slabs_clsid <= LARGEST_ID); */
The assert should be checking for clsid < LARGEST_ID, not <=. And
then the warning would go away. Or was the intent always to have 256
entries in the arrays, not 255?
Similarly, this code in items.c should be checking >=, not >, as
heads[LARGEST_ID] would be out-of-bounds:
if (slabs_clsid > LARGEST_ID) return NULL;
it = heads[slabs_clsid];
IMHO the confusion stems from the fact that LARGEST_ID is not itself a
valid id, as the name seems to imply.
Commit: fbdc57c8d5ad0f144c51de69545d14e3a5796e60
http://github.com/memcached/memcached/commit/fbdc57c8d5ad0f144c51de69545d14e3a5796e60
Author: Dustin Sallings <[email protected]>
Date: 2009-09-10 (Thu, 10 Sep 2009)
Changed paths:
M items.c
Log Message:
-----------
Kill off redundant and incorrect sizing definition.
It seems that in investigating the fencepost issue (issue59), it was
revealed that the 255 value of LARGEST_ID was well beyond what was
ever possible to be referenced.
As actual value was limited to the POWER_LARGEST definition in
practice, I have LARGEST_ID use POWER_LARGEST to define itself.
Commit: 7345ed4a9a9116170d7fbb50ca83c6d1d181be7c
http://github.com/memcached/memcached/commit/7345ed4a9a9116170d7fbb50ca83c6d1d181be7c
Author: Dustin Sallings <[email protected]>
Date: 2009-09-10 (Thu, 10 Sep 2009)
Changed paths:
M items.c
M items.h
M memcached.c
Log Message:
-----------
Kill off redundant item_init.
These are automatically initialized to 0 (both Trond and the spec says
so, and I asserted it on all current builders at least once before
killing it off).