🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer.misc
Article #202

Re: Tool to determine stack usage?

#202
From: Michael Hemsworth
Date: Fri, 30 Sep 1994 13:05
21 lines
1644 bytes
In <36fe1t$pq4@cpcug.org>, kbennett@cpcug.org (Keith Bennett) writes:
>I make an educated guess when determining the stack size for a new
>thread.  Does anyone have any suggestion as to a more accurate
>method?

Keith:

Checkout the DosGetInfoBlocks function in the Dos API,
(page 2-129 of the Control Program Programming Reference).
It returns the address of TIB (thread info block) of the current thread
       and the address of PIB (process info block) of the current process.
There are two fields in the TIB that contain the base and end address
of the current thread's stack.

HTH.
	mike

  Michael Hemsworth                Voice    : 416-979-5000 x 7422
  Ryerson Polytechnic University   Fax      : 416-979-5203
  Toronto                          Internet : mhemswor@acs.ryerson.ca
  Earth                            www      : http://mhh.rcc.ryerson.ca
Technical Details
Message-ID: <36h2du$u5j@hermes.acs.ryerson.ca>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!torn!hermes.acs.ryerson.ca!usenet
References: <36fe1t$pq4@cpcug.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cd94,53b7296271498944
X-Google-Attributes: gid10cd94,public
X-Google-Thread: 11307a,53b7296271498944
X-Google-Attributes: gid11307a,public
X-Google-ArrivalTime: 1994-09-30 23:18:16 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!torn!hermes.acs.ryerson.ca!usenet
From: (Michael Hemsworth)
Newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l
Subject: Re: Tool to determine stack usage?
Date: 30 Sep 1994 13:05:02 GMT
Organization: Ryerson Polytechnic Univertsity
Lines: 22
Message-ID: <36h2du$u5j@hermes.acs.ryerson.ca>
References: <36fe1t$pq4@cpcug.org>
Reply-To: mhemswor@acs.ryerson.ca
NNTP-Posting-Host: mhh.rcc.ryerson.ca
X-Newsreader: IBM NewsReader/2 v1.02