Using alloca in function parameters buggy or works ???

Dave Korn dk@artimi.com
Thu Sep 16 16:23:00 GMT 2004


> -----Original Message-----
> From: gcc-owner On Behalf Of Kaveh R. Ghazi
> Sent: 16 September 2004 16:16

> I'm looking over some memory leaks in gcc and I'm seeing lots of funny
> uses of concat like this from gcc.c:is_directory()
> 
>     strcmp (path,
>             concat (dir_separator_str, "lib", 
> dir_separator_str, ".", NULL))
> 
> It's pretty clear this memory allocation never gets free'd.  


  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!


  If anyone is ever again stupid enough to claim "Oh, but it doesn't really
matter", point them at the graphs showing gcc compile-time memory usage
against successive versions, then point them at all the long and agonised
discussions about it in the archive, then ask them if they'd like to be hit
over the head a thousand times with a matchstick or just once with a tree.

  Then hit them over the head a couple of times with a volume of Knuth and
tell them to go away and google 'scalability'.

;)

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Gcc mailing list