[Insight-developers] Missing ITK Valgrind? : Looking for Volunteers

kent williams norman-k-williams at uiowa.edu
Wed May 20 17:05:20 EDT 2009


Yeah. Valgrind works by tracking every variable mentioned in a program's
symbol table. In order to check every memory access, it's running an
interpreter that simulates a real-mode x86 CPU, so that every machine
instruction is checked for what memory it reads and writes.

Given that you're running the CPU in software with, a bunch of extra
book-keeping, and hacking up malloc-level heap management so that out of
bounds writes and reads are detected in dynamically allocated memory, 80x
slowdown isn't that bad.


On 5/20/09 3:31 PM, "Sean McBride" <sean at rogue-research.com> wrote:

> On 5/20/09 7:42 PM, Gaëtan Lehmann said:
> 
>> I can give some data - it may not be fully relevant, because of the
>> small numbers of tests, but it gives an idea:
>> 
>> [itkdash at pixel build]$ time ctest -Q -I 100,110
>> 
>> real 0m0.572s
>> user 0m0.504s
>> sys 0m0.073s
>> 
>> [itkdash at pixel build]$ time ctest -Q -I 100,110 -T Memcheck
>> 
>> real 0m42.973s
>> user 0m42.168s
>> sys 0m0.805s
> 
> Forgive my ignorance of this output...  Are you saying it's roughly 80
> times slower?



More information about the Insight-developers mailing list