memory leaks - Is there a way to suppress process id in valgrind output? -


i have 2 valgrind reports , want diff them. pid in each line, diff finds different. if can suppress pid in output, easier me diff. there way suppress process id in valgrind output ?

background:

my program simulator meant running forever (until manually killed). after initialization, can feed networking packets , processes them. using valgrind, i've narrowed down , fixed memory leaks occur during packet processing. however, still have small leak. trying figure out if there way me reset memory leak count in valgrind @ runtime. if could=> after sending 1 packet, i'd 0 out memory errors, , errors happening @ subsequent packet pass reported. couldn't figure out how this.

so, thought of taking diff of 2 valgrind reports: 1 one packet , l10 packets. should me narrow down culprit.

if there's better alternative solving without using diff, please let me know!

i haven't seen option prevents pid being printed, looking way add time limit how long valgrind ran may have missed it.

that said, each line begins "==pid==" make prog/script strip part out, run diff on left each run. valgrind doesn't use "=" anywhere else (in c++) should work:

string line; line = filein.readline(); int start = line.find_last_of('='); //index of last instance of char //you need start 1 behind last index //and end 1 index before size line = line.substr( (start + 1), (line.size() - 1) );  

right think that's best bet.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -