Re: To get the stacksize of current Thread?
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Wed, 21 May 2008 11:16:56 -0400
For what purpose?
Some years ago, we had a LISP interpreter built into our system (XLISP). The problem was
if the user wrote a recursive loop, we wanted to catch the stack overflow and report it,
but not crash the program. I had to create a special version of the stack-probe
subroutine that we linked into our version; it automatically subtracted 1K off the stack
size and reported a stack overflow 1K bytes early, but it reported it by doing a longjmp
(providing the pointer to the longjmp block was not NULL). In C++, I'd throw an
exception. So we used #pragmas to ensure that every module in the LISP interpreter that
could be involved in a recursion had stack probes enabled, even in release mode. Took me
several days to get this all working right, and another week to tune the performance so we
weren't doing stack probes in time-critical but stack-cheap functions.
joe
On Wed, 21 May 2008 16:52:36 +0530, "Sha" <shahulalways@xxxxxxxxxxx> wrote:
Hi pals,Joseph M. Newcomer [MVP]
How can I get the stacksize of a particular thread.
Regards,
Sha
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- To get the stacksize of current Thread?
- From: Sha
- To get the stacksize of current Thread?
- Prev by Date: Re: MFC(VC6) Application Localization from French to Chinese(RPC)
- Next by Date: Re: How to create the chm help file like MSDN?
- Previous by thread: To get the stacksize of current Thread?
- Next by thread: Re: To get the stacksize of current Thread?
- Index(es):
Relevant Pages
|