|
From: Dirk S. <val...@ds...> - 2008-05-16 18:46:10
|
On Fri, 16 May 2008, jlh wrote: > A program I'm writing apparently has memory leaks that I'd like to > find. However, the program has to process real time data and it > cannot process them fast enough when running in valgrind. How > would one deal with this situation? Ideally, I'd even like to run > it for a long time, like hours or even days, so that as many > different code paths as possible are being taken. One of our software projects has same limitations. I added an interface, which allows to store the input data and timestamps and also the reverse (loading timestamps and data back from disk). This way I can record data from e.g. 1 day and process it later with valgrind again (taking a week :-). This way I can test everything inside except the real input code (which ATM has a rarely occuring bug I try to track down for half a year now :-) Thought this method will probably only work, when the software design allows a more or less central data input instead of lots of input floating throught lots of different interfaces into the software. On the other hand even if valgrind is slow, it sometimes is helpful enough. Also there are link library replacements for the malloc/free functions, which allow the tracking you want to a certain degree (don't remember the name, "electric fence"?) Ciao -- http://www.dstoecker.eu/ (PGP key available) |