🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4174

Re: stack setting?

#4174
From: Peter Kittel GERMANY
Date: Tue, 03 Jul 1990 08:11
39 lines
1962 bytes
In article <13580002@hpspdra.HP.COM> ric@hpspdra.HP.COM (Ric Peregrino) writes:
>I have ported a wave editor program to the amiga and found that the 
>default stack of 4000 is too small. I tried using a system call in
>the program to automatically set the stack, but it seems to fail.
>Anybody know why this is, or how it can be done? 
>
>#include <stdio.h>
>#include <stdlib.h>
>
>void main(void) {
>
>printf("setting stack to 8192\n");
>system("stack 8192");
>system("stack");
>}
>
>the second call to stack with no argument returns the current stack
>size: 4000. 

Sorry, I only can tell you why this failed (ran into similar things
myself): Invoking system makes up a new CLI for this very command and
there the stack size is in fact increased. But then this one is closed
and the effect is gone before the next statement (that opens a CLI for
itself again).

The solution I use for similar situations is to start applications
only through script files (plus icon and IconX for convenience) that
contain only two lines:
    newcli con:... from file.s
    endcli
(or newshell), where file.s contains the stack command and the call
for your application. This way you have _two_ additional windows on
the screen at least for short time, but that's not so bad (you can
give them identical dimensions and positions, so you hardly notice).


-- 
Best regards, Dr. Peter Kittel      //     E-Mail to 
Commodore Frankfurt, Germany      \X/      rutgers!cbmvax!cbmger!peterk
Technical Details
Message-ID: <254@cbmger.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!cbmvax!cbmehq!cbmger!peterk
References: <13580002@hpspdra.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!cbmvax!cbmehq!cbmger!peterk
From: peterk@cbmger.UUCP (Peter Kittel GERMANY)
Newsgroups: comp.sys.amiga.tech
Subject: Re: stack setting?
Message-ID: <254@cbmger.UUCP>
Date: 3 Jul 90 08:11:59 GMT
References: <13580002@hpspdra.HP.COM>
Reply-To: peterk@cbmger.UUCP (Peter Kittel GERMANY)
Organization: Commodore Bueromaschinen GmbH, West Germany
Lines: 39