Glen Turner wrote:
> Taryn East wrote:
>
> > What FOSS projects (or parts therof) do you know that have really great
> > code in them? The kind of excellent code that a person with reasonable
> > but not brilliant skills could read/study and learn nifty things from?
>
> Samba.
Tridge gave a talk about Samba4 at LCA this year.
Things that I found interesting were:
- 25% of all the C code passed through the compiler was
autogenerated using a higher level descritpion language.
The autogenerated code had thorough error checking.
- Heavy use of valgrind. In particlar they stopped using
things like calloc and used malloc instead and then
use valgrind to make sure that no unititialised data
ended up on the wire (potential data leakages).
- Talloc ( http://talloc.samba.org/ ) a heirarchical memory
pool manager. This had huge wins for samba where each new
incoming connection was given an allocation context and all
related allocations are attached to the same context. When
the request has been completed a single talloc_free releases
all memory (and other resources like file descriptors) in
one go.
- Runtime selction of asynchronous event handling which can
mix processes, threads and state machines.
Tridge is a great speaker, but few people give a keynote that is
this technical. I loved it.
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"Web (hosting), security and high-performance computing are the
three areas where Linux has more strength." --
Bob Muglia, senior VP in charge of Windows Server development.
http://news.com.com/Microsoft+targets+Apache+Web+server/2100-1010_3-5735805.html
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html