-
Notifications
You must be signed in to change notification settings - Fork 182
mv valgrind cleanup
- development started August 27, 2013
Valgrind is an excellent program diagnostic tool (www.valgrind.org). Unfortunately, it is easy to let a program get into a condition such that valgrind generates more "noise" than actionable information. The Riak branch of leveldb was in such a condition. Some of the noise was from the original Google implementation. Some of the noise was from programmer laziness in the Riak modifications. This branch cleans up all the noise and addresses an actual edge case memory leak detected by valgrind. The memory leak joined the code base with Riak 1.4.
Valgrind was used with each of the unit test programs ("make check"). The branch cleans up the leveldb code and/or the unit test as appropriate to achieve a clean valgrind execution of the following command:
valgrind --leak-check=full --show-reachable=yes ./unit_test_program
"unit_test_program" is a placeholder for each of the Google unit test programs created by "make check". Warning: valgrind makes some programs run for a long, long time. Example: "db_bench" requires over an hour under valgrind. And valgrind limits everything to a single CPU. Pick a machine with a fast clock rate over one with tons of CPUs. The unit tests addressed by this branch are:
arena_test coding_test c_test env_test log_test table_test write_batch_test bloom_test corruption_test dbformat_test filename_test memenv_test version_edit_test cache_test crc32c_test db_test filter_block_test skiplist_test version_set_test