Message-Id: <199712291719.TAA01514@ankara.duzen.com.tr> Comments: Authenticated sender is From: "S. M. Halloran" Organization: User RFC 822- and 1123-Compliant To: NonReal Date: Mon, 29 Dec 1997 19:20:34 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: "big" arrays and the stack CC: djgpp AT delorie DOT com In-reply-to: <34A7C2FF.390A@geocities.com> Precedence: bulk On 29 Dec 97, NonReal was found to have commented thusly: > > i have no idea what you mean here, but the difference is whether the > > array is global or allocated on the stack. the default stack size for > > djgpp programs is 256Kb, so a local array larger than that will corrupt > > the stack, leading to a crash. you can either increase the size of the > > stack, or, better IMO, allocate such a large amount of memory > > dynamically. > > How do you change the stack size? I've got a nasty recursive program > that would love more space to work in :) > > *wave* > -Tim The quoted text section below is taken right out of the info text for the djgpp/gcc C library reference, courtesy of the rhIDE interface. Syntax ------ extern int _stklen; Description ----------- This variable sets the minimum stack length that the program requires. Note that the stack may be much larger than this. This value should be set statically, as it is only used at startup. Example ------- int _stklen = 256000; This is also pretty much the case for informing Borland's compiler what kind of stack you want, and I suspect is also true of the rest (Microsoft, Watcom, etc.). Best regards, Mitch Halloran Research (Bio)chemist Duzen Laboratories Group Ankara TURKEY mitch AT duzen DOT com DOT tr other job title: Sequoia's (dob 12-20-95) daddy