My vote is for SQLite. It is very well written, incredibly well tested, and one of the simplest and most flexible tools out there. My favorite part is the extensive documentation explaining the architecture decisions they made.
And according to them, valgrind (and linux) can be qualified as beautiful piece of code[1]:
"Valgrind is perhaps the most amazing and useful developer tool in the world. Valgrind is a simulator - it simulates an x86 running a Linux binary. (Ports of Valgrind for platforms other than Linux are in development, but as of this writing, Valgrind only works reliably on Linux, which in the opinion of the SQLite developers means that Linux should be the preferred platform for all software development.) As Valgrind runs a Linux binary, it looks for all kinds of interesting errors such as array overruns, reading from uninitialized memory, stack overflows, memory leaks, and so forth. Valgrind finds problems that can easily slip through all of the other tests run against SQLite. And, when Valgrind does find an error, it can dump the developer directly into a symbolic debugger at the exact point where the error occur, to facilitate a quick fix."
[1] https://www.sqlite.org/testing.html