PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Running Valgrind on Tests 201-203
Date: Thursday, 26 Mar 2020, 19:55:07


    > Message Posted By: Unknown
    >
    > I wanted to make sure that I was having no memory leaks on my Deque.c
    > implementation, so I ran valgrind (i.e. valgrind --leak-check=full
    > /c/cs223/Hwk4/test.Qsort 201) and got lots of leaks (>2 million bytes not
    > allocated/freed properly) and the error messages say it is due to a
    > calloc/Perl call (even though I use neither). Is this the correct way to
    > check any errors with memory allocation on our Deque.c implementation or
    > should we be testing it in some other way?

The command

  % valgrind --leak-check=full /c/cs223/Hwk4/test.Qsort 201

runs valgrind on the Perl script /c/cs223/Hwk4/test.Qsort,
not your program.

Similarly, the command

  % valgrind --leak-check=full /c/cs223/Hwk4/Tests/t201

runs valgrind on the Bash script /c/cs223/Hwk4/Tests/t201.

To run valgrind on your program, you must make a copy of
Tests/t201, "chmod +w" it so that it is writable, change
"valgrind -q" to "valgrind", and issue the command

  % ./t201

--Stan-
PREV INDEX NEXT