Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak when tracking performance #20

Closed
abumq opened this issue Jan 26, 2013 · 0 comments
Closed

Memory leak when tracking performance #20

abumq opened this issue Jan 26, 2013 · 0 comments
Labels

Comments

@abumq
Copy link
Owner

abumq commented Jan 26, 2013

There is a memory leak when tracking performance, this comes from END_FUNC that re-initialte all the streams to write function performance summary to logs.

Proof

sh build_all.sh && valgrind ./bin/time_tracker.cpp.bin
==19585== Memcheck, a memory error detector
==19585== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==19585== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==19585== Command: ./bin/time_tracker.cpp.bin
==19585== 
[INFO] [26/01/2013 11:38:10.975] Result is 3
==19585== 
==19585== HEAP SUMMARY:
==19585==     in use at exit: 1,417 bytes in 3 blocks
==19585==   total heap usage: 131 allocs, 128 frees, 55,029 bytes allocated
==19585== 
==19585== LEAK SUMMARY:
==19585==    definitely lost: 0 bytes in 0 blocks
==19585==    indirectly lost: 0 bytes in 0 blocks
==19585==      possibly lost: 537 bytes in 1 blocks
==19585==    still reachable: 880 bytes in 2 blocks
==19585==         suppressed: 0 bytes in 0 blocks
==19585== Rerun with --leak-check=full to see details of leaked memory
==19585== 
==19585== For counts of detected and suppressed errors, rerun with: -v
==19585== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant