Article View: comp.os.os2.programmer
Article #296Re: Strange trap in IBM C Set/2
From: David Bolen
Date: Fri, 07 Aug 1992 14:54
Date: Fri, 07 Aug 1992 14:54
28 lines
1965 bytes
1965 bytes
In article <713061696snx@ananke.stgt.sub.org> ak@ananke.stgt.sub.org (Andreas Kaiser) writes: >Why did IBM implement a fixed stack size in IBM C? Since OS/2 2.0 >provides a paged memory management, there should be no reason not to >let the stack grow automatically. EMX does it this way. There is just >one single disadvantage: to notice an endless recursion, you have to >listen to the sound of your disk drive. But you don't have to count >stack bytes. It's only true for the primary thread of an application. Any threads that you created under C Set/2 with the beginthread() call it set up with a maximum stack size, and the compiler handles guard page exceptions in order to commit additional stack space as necessary, up the maximum specified when the thread was created. I don't know why the primary thread doesn't do this as well, unless it's an OS/2 thing for the primary thread of an executable... I'm not that familiar with EMX - could it be creating an extra thread right off the bat to run the program in? -- -- David -- /-----------------------------------------------------------------------\ \ David Bolen \ Internet: db3l@ans.net / | Advanced Network & Services, Inc. \ Phone: (914) 789-5327 | / 100 Clearbrook Road, Elmsford, NY 10523 \ Fax: (914) 789-5310 \ \-----------------------------------------------------------------------/
Technical Details
Message-ID:
<1992Aug07.185323.67191@ans.net>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!news.ans.net!ans.net!db3lReferences:
<19920804.113915.320@almaden.ibm.com> <713061696snx@ananke.stgt.sub.org>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!news.ans.net!ans.net!db3l From: db3l@ans.net (David Bolen) Subject: Re: Strange trap in IBM C Set/2 Sender: news@ans.net (News Administrator) Message-ID: <1992Aug07.185323.67191@ans.net> In-Reply-To: ak@ananke.stgt.sub.org's message of Thu, 06 Aug 92 00: 41:36 GMT Date: Fri, 7 Aug 1992 14:54:28 GMT References: <19920804.113915.320@almaden.ibm.com> <713061696snx@ananke.stgt.sub.org> Organization: Advanced Network & Services, Inc. - Elmsford, NY Lines: 28