Huh? Modern OSes will of course free the memory (as well as any other resources) when the process exits.
If you know your program has limited runtime you can treat standard heap allocation functions like an over-engineered arena allocator. :)
Re:Chibicc – A Small C Compiler
by simonkagedal on Sunday November 13, 2022 @01:29PM
(#33585846)
I did not mean the cli itself (such as bash), but small programs it executes (such as ls).
Also not arguing for the practice as a general strategy, but feels like it could have a place!
also memory cost money, no big deal for your machine, but scale this to a fleet of thousands of machines and it start to cost big money
then people wonder why their burnrate is indecently high