News for hackers. Stuff that matters.
Re:Chibicc – A Small C Compiler by teo_zero on Sunday November 13, 2022 @12:18PM (#33585068)
I always use this technique. It make no sense to free() all the memory just before the exit().

But the prerequisite isn't whether the program is short-lived, but rather that the memory usage pattern is "alloc often, free at the end".

Re:Chibicc – A Small C Compiler by simonkagedal on Sunday November 13, 2022 @01:25PM (#33585801)
With ”short-lived”, I rather meant something like: ”does one job and then exits”, as opposed to something more dynamic – of course, that it takes a long or short time to execute isn’t by itself relevant.