Article View: comp.os.msdos.programmer
Article #3177Re: alloca for MSDOS
From: Ran Atkinson
Date: Tue, 27 Nov 1990 15:24
Date: Tue, 27 Nov 1990 15:24
18 lines
1549 bytes
1549 bytes
The alloca() function is not defined by ANSI C and is inherently non-portable and potentially dangerous. It cannot be implemented on some architectures and on others can only be implemented in a manner that is inefficient. It is unwise to use alloca() ever. In the case of BISON, one would be better off to have it use variables off the stack or from malloc()/free() instead. Such modifications have been done to BISON in the past with great success. See the recent (recurring) discussion in comp.lang.c for details on why one should avoid alloca() and pay particular attention to the postings by Chris Torek and Doug Gwyn. ( One wonders why yet another person is porting BISON to MSDOS when it was already successfully ported once and is available from the sources archives near you and from places like SIMTEL-20 in both source and binary form. ) Ran randall@Virginia.EDU
Technical Details
Message-ID:
<1990Nov27.152458.23920@murdoch.acc.Virginia.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!rutgers!mcnc!uvaarpa!murdoch!newsReferences:
<0093FFFD.51B399C0@router.jhuapl.edu> <11798@spool.cs.wisc.edu> <1292@digi.lonestar.org> <1739@umriscc.isc.umr.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!rutgers!mcnc!uvaarpa!murdoch!news From: randall@Virginia.EDU (Ran Atkinson) Newsgroups: comp.os.msdos.programmer Subject: Re: alloca for MSDOS Keywords: alloca, bison, where Message-ID: <1990Nov27.152458.23920@murdoch.acc.Virginia.EDU> Date: 27 Nov 90 15:24:58 GMT References: <0093FFFD.51B399C0@router.jhuapl.edu> <11798@spool.cs.wisc.edu> <1292@digi.lonestar.org> <1739@umriscc.isc.umr.edu> Sender: news@murdoch.acc.Virginia.EDU Reply-To: Ran Atkinson <randall@Virginia.EDU> Followup-To: comp.lang.c Organization: University of Virginia Lines: 18