Hacker News new | ask | show | jobs
by daenz 2311 days ago
>Intuitively, calculating how much memory a program will leak in the worst case should be at least as much effort as fixing the memory leaks.

Why? I could calculate the average amount of leaking of a program much easier than I could find all the leaks. Calculating just involves performing a typical run under valgrind and seeing how much was never freed. Do that N times and average. Finding the leaks is much more involved.

1 comments

Did you read in my original post the distinction between calculating and measuring a leak?