| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: trap 0005 |
-16 Mar 97 16:52:58-
=Henk den Adel babbled to All about trap 0005=
HdA> problems are solved under OS/2 and DOS; the reason probably is that
HdA> the struct is placed in the data segment.
Yes, "static" places the structure in the data segment.
HdA> The same result (under OS/2 and DOS) could be achieved when static is
HdA> omitted when simultaneously the stack size was enlarged to
HdA> STACK:50000.
HdA> I would appreciate if anyone could explain me why the stack is not
HdA> automatically chosen to be sufficiently large, or better how to order
HdA> the compiler to choose the right stack size. I'm using ibm's C
HdA> compiler, version 2.01.
The reason is that the compiler does not know how large to make the
stack, so it uses a default size. That function needs 40k of stack.
What if that function called a function in another source file that
needs another 40k of stack. How is the compiler to know this?
Anyways, it's the linker that actually makes the stack definitions, and
it doesn't know how much you've used. Just make your stack large
enough.
Mike Phillips
INTERNET: phil4086{at}utdallas.edu
... Heresy is only another word for freedom of thought.
--- FMail/2 1.22
* Origin: oOo The Pit Viper oOo (1:124/2145)SEEN-BY: 50/99 54/99 270/101 620/243 625/155 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 124/2145 2342 1 396/1 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.