TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Henk den Adel
from: Vladimir Djuzheff
date: 1997-03-22 21:10:48
subject: trap 0005

Hi Henk.

 HdA> Using an iterative method to determine the approximate stack size.
 HdA> :-(

  ??? Just set it as large as you wish - f.ex. 16000000. It doesn't mean
that you lose all this memory - it will be allocated in _non-committed_
mode, and _real_ allocation will take place only when your app will need
it. I usually set my stack size to value 4194304. (Mmm... I remember, one
of dumb compilers -- may be Borland C/2 1.0? -- has used allocating in
committed mode -- it was bug).

 PE>> icc /B"/stack:50000" fred.c

 HdA> That works. The reason why i'm amazed is that Unix can determine the
 HdA> correct or a sufficiently large amount of stack, and OS/2 seemingly
 HdA> can't. I thought i might have been forgotten a compiler switch...

  How the OS could determinate "sufficiently large amount of
stack"? Just try to suppose? No logical way. Who knows, may be small
1K app is the sample showing recursion -- and really needs for about 1M of
stack? May be, your Unix compiler just used large stack as I said as
default?

bye.   [Team OS/2]
dozen
SPb,Russia

--- FleetStreet 1.19 NR
* Origin: живи и дай умереть (2:5030/297.31)
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: 5030/297 110 48 16 464/34 5100/8 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™.