Article View: comp.os.os2.programmer
Article #414stack size
From: Glen Herrmannsfeldt
Date: Wed, 22 Jul 1992 18:38
Date: Wed, 22 Jul 1992 18:38
26 lines
1352 bytes
1352 bytes
link386 seems to have a 2k default stack. I just finished a series of bug reports to bug-gcc that I finally decided were due to too small a stack. I call to getchar() would write over parts of program memory. Then I tried different stack sizes with link386. 4k, 256k, 4MB, 64MB, 1GB, 256MB. Up to 64MB ran fine, fast, etc. Apparently it does not need to allocate the whole thing in real or swap space. At 1GB it refused to load. At 256MB it got an internal processing error, which, if I figure out how, I will report to IBM. (Any one from IBM? How do I do this?) It seems that there is little penalty for a big stack, and a large penalty (clobbered memory) for a small stack. Why not have a big default stack? Has anyone else experienced any of this? Remember, a call to getchar() and nothing else will overflow a 2K stack!
Technical Details
Message-ID:
<gah.711830283@oldhood>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!gahShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!gah From: gah@hood.hood.caltech.edu (Glen Herrmannsfeldt) Subject: stack size Message-ID: <gah.711830283@oldhood> Summary: how big a stack can, and should, one have? Keywords: stack Sender: news@cco.caltech.edu Nntp-Posting-Host: oldhood.hood.caltech.edu Organization: California Institute of Technology, Pasadena Date: Wed, 22 Jul 1992 18:38:03 GMT Lines: 26