3 ms·
> There is no point in freeing blocks at the end of a program ...unless you are trying to find memory leaks in your program. In that case it would be very hel
by colonwqbang 4y ago
> There is no point in freeing blocks at the end of a program
...unless you are trying to find memory leaks in your program. In that case it would be very helpful if the program, and the libraries it uses, were written to actively free all allocated memory.
> I think many GNU tools just never free any memory
It is absolutely true that some GNU software (including libraries like glib) allocate memory that they never intend to free. This causes leak analysis of programs that link with these libraries to be more painful than necessary.
- miohtama 4y agoTo work around leaks, just don’t run your GNU programs for very long (:
- Maken 4y agoMaybe this is the intended use case of timeout(1).
- DominoTree 4y agoMany GNU programs will helpfully terminate periodically with SIGSEGV to help prevent memory leaks from becoming a problem