Using alloca in function parameters buggy or works ???

Robert Dewar dewar@gnat.com
Thu Sep 16 16:38:00 GMT 2004


Dave Korn wrote:

>   Death to the "Why should I bother tracking or freeing resources I've
> allocated when the OS will do it for me at process termination" school of
> programming!

Well I am not so sure this is the right attitude. It may be more valuable
to sign up for the "let's make sure we don't use too many resources"
school of programming. I personally think that problems of excessive
memory use are often better addressed by drastically reducing memory
use in the first place.

It's interesting that in the case of the GNAT front end (which has provision
for freeing stuff, but we have never used it), the only complaints
we have got about excessive memory usage are cases of clearly poor
implementation strategies (really bugs :-)




More information about the Gcc mailing list