Mail Archives: djgpp/2009/05/21/00:50:27

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Thu, 21 May 2009 00:48:51 -0400
From: Ethan Rosenberg <ethros AT earthlink DOT net>
Subject: Re: Increasing area for variable storage
In-reply-to: <>
To: djgpp AT delorie DOT com
Message-id: <>
MIME-version: 1.0
X-Mailer: QUALCOMM Windows Eudora Version
References: <0KJY00585R208H10 AT mta5 DOT srv DOT hcvlny DOT cv DOT net>
<EYqdnW-SUoAJFonXnZ2dnUVZ_qadnZ2d AT earthlink DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

At 07:00 PM 5/20/2009, you wrote:
>"Ethan Rosenberg" <ethros AT earthlink DOT net> wrote in message
>news:0KJY00585R208H10 AT mta5 DOT srv DOT hcvlny DOT cv DOT net...
> > Dear List -
> >
> > Thank you for all your help in the past.
> >
> > I am running DOS 7.1 [the DOS that underlies Windows98].  The computer
> > does NOT have Windows installed on it.
> >
> > I have a program that had a size of 228,038 bytes and ran perfectly in the
> > past.  When I added some more code, increasing the size to 241,134 bytes I
> > get a SIGSEGV error when I attempt to initialize a variable.  The routine
> > was scanned with Splint, which showed no errors. When I removed some code,
> > it again ran perfectly.  My feeling is that I have overrun the boundary of
> > the area in which the values of the variables, or possibly the variables
> > themselves, are stored.
> >
> > How do I increase these area(s)?
>If your variables are stack based, you can increase the stack
>size using stubedit for your program (usually 512KB, but
>can be changed).  If you are allocating your variables via
>new, malloc, or static storage, there is no limit (other than
>the amount of memory / paging / dpmi memory available).
>If increasing the stack size does not resolve your problem,
>then it is some other bug, not sizing related.  Look at the
>line number referenced by symify for more details.


I noticed in the FAQs the following:

"If the default stack size is not enough, you can change it with the 
STUBEDIT program (change the parameter "Minimum amount of stack 
space"), or by setting the global variable _stklen in your program. Example:

  unsigned _stklen = 1048576;  /* need a 1MB stack */"

If I wish to use _stklen, do I have to put the above statement in 
each function, or is it sufficient to put in in main?


PS How can I get the error dump [stderr] into a file?

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019