Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Alloca: Its use is hazardous to the health of your program? Keywords: alloca, malloc Message-ID: <16822@haddock.ima.isc.com> Date: 8 Jun 90 02:18:49 GMT References: <1990May31.004024.29385@agate.berkeley.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Distribution: usa Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 11 In article <1990May31.004024.29385@agate.berkeley.edu> andychoi@ocf.berkeley.edu (Andrew Choi) writes: >One last question: Why is alloca so machine-dependent? It seems that >it shouldn't be ... If it's implemented as a front-end to malloc(), then it's hard to make sure the free() gets done when the function ends. If it's implemented by expanding the stack frame, then on machines that have no frame pointer it can't be done without assistance from a compiler builtin. Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint