Patch: static_const nitpicky patch
brad at danga.com
Mon Mar 5 22:46:07 UTC 2007
Steven, if you have no objections, where do you want this? In both the
2.x and mt trees? I could just get Paul commit access to commit it
himself, if you say where you want it.
On Fri, 2 Mar 2007, Paul Lindner wrote:
> Okay, more janitorial work. I have to go back and do day job stuff
> now. :)
> * Add autoconf magic for stdbool.h
> * Use booleans as appropriate in a few places
> * Add slabs.h, items.h and assoc.h
> * Move most of the declarations from memcached.h into memcached.c
> where they belong. Added appropriate static quantifiers.
> * Correctly use NULL for pointers, 0 for integers for logic tests
> and return values.
> Size clocks in at a lean 37812 bytes. With a little more pruning (or
> -Os) we should be able to get it to run inside the L1 cache :)
> On Fri, Mar 02, 2007 at 03:59:55AM -0800, Paul Lindner wrote:
> > So I dived into the memcached code and found a number of simple
> > cleanups involving judicious use of const and static.
> > Depending on how the code base evolves one could move many of the
> > declarations in memcached.h into memcached.c and declare many more
> > functions static.
> > Ideally only the exposed interface for each .c file would be
> > contained in the .h file.
> > All tests pass, the compiled/stripped executable size drops about 5%
> > with these changes. On my machine
> > clean trunk 39972 bytes
> > modded trunk 38244 bytes
> Paul Lindner ||||| | | | | | | | | |
> lindner at inuus.com
More information about the memcached