Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!pcsbst!jkh From: jkh@bambam.pcs.com (Jordan K. Hubbard) Newsgroups: comp.sys.amiga.programmer Subject: Re: AmigaGCC stack hogging Message-ID: Date: 29 Jan 91 04:10:02 GMT References: <1882f287.ARN1979@moria.UUCP> <1991Jan14.212254.9779@csun.edu> <18887df5.ARN1ad7@moria.UUCP> <1991Jan17.141218.19953@zorch.SF-Bay.ORG> <17766@cbmvax.commodore.com> Sender: news@pcsbst.pcs.com Organization: PCS Computer Systems, GmbH Lines: 20 In-reply-to: jesup@cbmvax.commodore.com's message of 17 Jan 91 23:30:41 GMT > The problem is that GCC (and other gnu code) allocates LARGE >amounts of memory using alloca, and holds it for a long time. For example, >I'm told that the preprocessor or compiler pulls entire files into a The pre-processor does this. And it doesn't hold it that long, remember: alloca()'d data goes away the minute the calling procedure returns. This whole scheme works very nicely under UNIX - It's a pity that processes's can't seem to automatically grow their stacks during run time. Why is this? I could even see a scheme where a process was halted completely and copied to a new (larger) chunk of memory in order to "grow its stack" if such mastication were necessary - it would still be better than nuking it entirely. Jordan -- PCS Computer Systeme GmbH, Munich, West Germany UUCP: pyramid!pcsbst!jkh jkh@meepmeep.pcs.com EUNET: unido!pcsbst!jkh ARPA: jkh@violet.berkeley.edu or hubbard@decwrl.dec.com