Mail Archives: djgpp/2009/05/21/00:50:27
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.
===========
Thanks.
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?
Ethan
PS How can I get the error dump [stderr] into a file?
++++++++++++
- Raw text -