[comp.sys.amiga.programmer] Specifying stack size in SAS/C

bjoerns@stud.cs.uit.no (Bjoern Stabell) (05/31/91)

In the 5.10 manual it says that it is possible to specify a minimum stack
size for programs at compile time, but I couldn't find out how to do it.

Hopefully the statement saying that this could be done (and that the
compiler would allocate a new stack if the stack size was too small)
wasn't referring to the _stack variable, which I beleive only works for
resident / programs linked with cback.o.

I think I read something about this on news before, but I couldn't find
the article when I scanned backwards (probably deleted by the sysops :(

// bjoerns



-- 
+   +   +   +   +   +   +   + _ +   +   +   +   +   +   +   +   +   +   +   +
+ <<< Bjoern Stabell >>> _   //  C= AMIGA ... Only Amiga makes it possible! +
+ University of Tromsoe  \\ //                                              +
+ bjoerns@stud.cs.uit.no  \X/  DIPLOMACY: Austria    IRC: Tas    MUD: Selac +

Lee Sailer <UH2@psuvm.psu.edu> (06/01/91)

>In the 5.10 manual it says that it is possible to specify a minimum stack
>size for programs at compile time, but I couldn't find out how to do it.


From memory, always a risk 8-)

Don't you just put an

   unsigned int _stklen = 40000;

in your code somewhere?  (Maybe it should be long.  The number is
the desired stack size.)  The only glitch is that you might get a linker
warning when it finds _stklen already defined in the library.

                                                             lee

mykes@amiga0.SF-Bay.ORG (Mike Schwartz) (06/02/91)

In article <1991May31.133015.7823@mack.uit.no> bjoerns@stud.cs.uit.no (Bjoern Stabell) writes:
>In the 5.10 manual it says that it is possible to specify a minimum stack
>size for programs at compile time, but I couldn't find out how to do it.
>
>Hopefully the statement saying that this could be done (and that the
>compiler would allocate a new stack if the stack size was too small)
>wasn't referring to the _stack variable, which I beleive only works for
>resident / programs linked with cback.o.
>
>I think I read something about this on news before, but I couldn't find
>the article when I scanned backwards (probably deleted by the sysops :(
>
>// bjoerns
>
>
>
>-- 
>+   +   +   +   +   +   +   + _ +   +   +   +   +   +   +   +   +   +   +   +
>+ <<< Bjoern Stabell >>> _   //  C= AMIGA ... Only Amiga makes it possible! +
>+ University of Tromsoe  \\ //                                              +
>+ bjoerns@stud.cs.uit.no  \X/  DIPLOMACY: Austria    IRC: Tas    MUD: Selac +

Read the c.a file that comes in the sources subdirectory of SAS.

--
****************************************************
* I want games that look like Shadow of the Beast  *
* but play like Leisure Suit Larry.                *
****************************************************