Thursday December 27, 2007
Valgrind 3.3.0 hit the streets a couple of days ago and I did not notice! In the unlikely case you haven't heard of this amazing application before, it is a suite of tools for debugging and profiling programs. It is one of the most useful programs I have ever used, actually.
IMO, the best thing about this release is that Helgrind is back. The long-awaited synchronisation errors detector is working again after a few years out of the package. That's so sweet! :-)
I'm going to get it compiled on my Linux box right away (it is extremely platform dependent and it only works on Linux).
Coroutines in C: "So each time the decompressor emits another character, it saves its program counter and jumps to the last known location within the parser - and each time the parser needs another character, it saves its own program counter and jumps to the location saved by the decompressor. Control shuttles back and forth between the two routines exactly as often as necessary."
I would describe this interesting (and dirty) programming trick as "How to implement yield in plain C. Worth a read.