<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=796335823-06042007><FONT face=Arial
color=#0000ff size=2>I don't have commit on the repo, so it is not checked
in. Anyone that does have anything to say about the patch or body of the
email? </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796335823-06042007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796335823-06042007><FONT face=Arial
color=#0000ff size=2>You are welcome to apply it if you'd
like.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796335823-06042007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796335823-06042007><FONT face=Arial
color=#0000ff size=2>/tmy</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rkmr.em@gmail.com
[mailto:rkmr.em@gmail.com] <BR><B>Sent:</B> Friday, April 06, 2007 5:52
PM<BR><B>To:</B> Tim Yardley<BR><B>Cc:</B>
memcached@lists.danga.com<BR><B>Subject:</B> Re: PATCH: code
cleanup<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>is this checked in svn or do i need to apply this patch?</DIV>
<DIV>thanks<BR><BR> </DIV>
<DIV><SPAN class=gmail_quote>On 4/5/07, <B class=gmail_sendername>Tim
Yardley</B> <<A
href="mailto:liquid@haveheart.com">liquid@haveheart.com</A>> wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">All;<BR><BR>Attached
is a patch against the multithreaded branch that cleans up spacing<BR>issues
bringing the codebase to a hopefully consistent style. It also
<BR>addresses -Wall warnings, some null checks (a TODO item iirc), and
adds<BR>asserts at the top of each function for any use of conn *c without
checking<BR>to see if c is NULL first.<BR><BR>Hopefully those asserts are not
necessary as we all write perfect code... <BR>Right? Anyway, that
conn object is used and passed around enough that it<BR>should be
checked.<BR><BR>Note that there are a couple other areas that could be
addressed on an<BR>optimization level. I addressed a few like
multiple assignments to a <BR>variable where not needed, elimination of unused
variables, value assignment<BR>at initiation where it made sense, #ifdef where
a function wont be used,<BR>etc.<BR><BR>Other things that I noticed that could
be addressed but require consensus: <BR>- optimization of the switch
statements to leverage jump tables at<BR>compilation<BR>- focusing on popular
default cases at the top of the switch to reduce<BR>comparisons<BR>-
restructing switch statements if necessary to support that under <BR>different
compilers (nesting the switches)<BR>- visiting the usage of char vs int (byte
alignment, powers of two<BR>padding, etc)<BR>- inlining some of the smaller
functions (candidates would include some of<BR>the item funtions, etc)
<BR><BR><BR>A couple of the malloc cases in there looked potentially
troubling<BR>(arbitrary values chosen, and some potential other
misallocations) but I<BR>didn't spend the time to fully analyze
them. Does anyone have access to one <BR>of the commercial source
audit applications that would like to run memcached<BR>through
it? If not, would anyone be interested in me persuing that
avenue<BR>with some of the vendors that have offered to run their commercial
<BR>applications on opensource software?<BR><BR>Feedback
welcome.<BR><BR>/tmy<BR><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>