🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How do I find out how much stack space I have ??

#10503
From: Leo 'Bols Ewhac' Schwab
Date: Tue, 06 Dec 1988 07:27
26 lines
1702 bytes
In article <5422@cbmvax.UUCP> bryce@commodore.COM (Bryce Nesbitt) writes:
:The stack is different from CLI and Workbench.  If your compiler has
:a global that gives the stack size, then use it.  Else:
:
:[ code ]
:	fprintf(Handle,"Actual stack is: %ld\n\n",
:	       CLI->cli_DefaultStack<<2);
:	}
:    else
:	{
:	fprintf(Handle,"This is not a CLI process\n");
:	fprintf(Handle,"Actual stack is %ld\n\n",Process->pr_StackSize);
:	}

	Say, Bryce, didn't we go around on this a while back?  As I recall,
the CLI, Process, and Task structures lie about how much stack you have.
The only reliable way to find out how much stack you have is to look at the
longword at the very top of the stack, which contains the stacksize.

	Finding the top of your stack is not obvious to me at the moment...

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	INET: well!ewhac@ucbvax.Berkeley.EDU
 \_ -_		Recumbent Bikes:	UUCP: pacbell > !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor
Technical Details
Message-ID: <7848@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!ucbvax!hplabs!well!ewhac
References: <42@ssibbs.UUCP> <5422@cbmvax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!ucbvax!hplabs!well!ewhac
From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
Newsgroups: comp.sys.amiga.tech
Subject: Re: How do I find out how much stack space I have ??
Message-ID: <7848@well.UUCP>
Date: 6 Dec 88 07:27:48 GMT
References: <42@ssibbs.UUCP> <5422@cbmvax.UUCP>
Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
Organization: Argon Oil.  At Argon, we're working to keep your money.
Lines: 26
Quote: "Do we fight?"  -- Dayna
 "Certainly not.  We run."  -- Avon