Hacker News new | ask | show | jobs
by stevefan1999 1225 days ago
If this project can trace memory allocation/deallocation and their call stacks in real time -- this would be super useful, because we can statistically profile which function is always allocating without proper free in a certain time frame (when the memory is supposed to be freed), because valgrind only tells you there are memory leaks but not where is the leak exactly.
2 comments

Depends on what you mean by "real time". My method of crawling the stack impacts execution speed of the app you are tracing. I intended to do future work to minimize that impact.

With allocscope, you do get a callstack for the allocations which leak, though.

For real time I mean it will not severely slows down a game from 120fps to 40fps, this kind of real time
Valgrind with --leak-check does include the stack trace of where unfreed memory was originally allocated.