X-Authentication-Warning: delorie.com: 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 Subject: Re: Increasing area for variable storage In-reply-to: To: djgpp AT delorie DOT com Message-id: <0KJZ00EEK9DY1620@mta5.srv.hcvlny.cv.net> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <0KJY00585R208H10 AT mta5 DOT srv DOT hcvlny DOT cv DOT net> 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 Precedence: bulk At 07:00 PM 5/20/2009, you wrote: >"Ethan Rosenberg" 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? ++++++++++++