News for hackers. Stuff that matters.
Re:Ask HN: Memory leaks in C/C++ Application debugger tool? by jay-barronville on Thursday August 08, 2024 @09:30AM (#41191277)
Why not override the allocator functions and track the memory allocations and deallocations yourself?

You can do pretty much anything at that point (e.g., you can track memory allocations and deallocations at only the specific levels you care about)…

Re:Ask HN: Memory leaks in C/C++ Application debugger tool? by b20000 on Thursday August 08, 2024 @11:47AM (#41192804)
i recommend this approach as well, i've done this to keep track of statistics
Re:Ask HN: Memory leaks in C/C++ Application debugger tool? by iExploder on Thursday August 08, 2024 @11:51AM (#41192853)
this is such a generic statement... as long as you de-allocate on exit it wont show up as leak, that doesnt mean the app is not continuously allocating more memory, whether as bug or for a valid reason is up to you to find out...

you can try https://gperftools.github.io/gperftools/heapprofile.html setup HEAP_PROFILE_TIME_INTERVAL and look at the reports to see which code lines keep allocating memory...