(Generosity with questionable benefits) --- from /linux-3.17.1/net/ipv4/ping.c * Pavel gave all rights to bugs to Vasiliy, none of the bugs are Pavel's now.
(History may not repeat, but it will misname things {at least in some versions}) -- /linux-2.4/include/(some versions of)/uaccess.h * For historical reasons, these macros are grossly misnamed.
(We can't think of much to say here right now, but we're saying something anyway.) --- from Python-2.7.9/Modules/_ctypes/stgdict.c
* XXX blabla more (What the world really needs is r/codegonewild) -- from git/patch-delta.c */* sanity check */ if (data != top || size != 0) { error("delta replay has gone wild"); }
A very good place to start is Mr. Golick's intro: Memory Allocators 101, then there is Mr. Luu's C tutorial, or even Doug Lea's dlmalloc. But, that's only the beginning of a very good, very long story.
Strategies (the very meat of this post):
There is an interesting survey on the different ways of writing a memory allocator, it's very informative (and well-written), and useful to know in general (even though it's a little old).
More Specific:
For even more pleasing (and productive) confusion, there's TCMalloc, Lockless and a short paper that compares glibc to the former and the latter.
The Lockless site has some neat info on how to profile without a profiler, using gcc. (their article collection is also quite a good read [with a very special recommendation for the rather nifty 'Obfuscated Rogue' proggy <3 !]).
Happy alloc()-ing!
Ps.: Stuff I idly wonder about:
None of the above seem to take performance profiles of stuff as they run and then automate the conclusions.
There is probably a very good reason for it (there always is :-) --- but, I wonder what would happen if we had a wrapper that that 'kept score' and did test runs on the inputs it knows about and then swaps in different memory allocators on the next run, depending on what profiles match that particular usage pattern the best.
In other news, here's my sure-fire way of how to beat the backgammon world champion: you roll a double-6 to run home, and with the final checker, you put their 15th checker on the bar. EASY! ;-)
+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+
Obligatory New Years' Eve video... Ms Sophie is celebrating her birthday party. The only problem is that all her guests deceased 25 years ago, and so, the butler has to stand in... (scroll forward to 2:24 to start the actual sketch, but, in full length with the German intro, it still makes a nice ambience, even if you do not speak German ;-) the rest is, as they say, without words!