Mail Archives: djgpp/1997/12/29/01:02:11
mephisto wrote:
>
> When you have a line like this "char MyArray[20000000];", DJGPP will
> attempt to allocate the array, but if you use implicit allocation(ie,
> not using malloc or an equilavent) DJGPP won't make your program
> crash. So, use malloc and test the results.
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.
--
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA
mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/
- Raw text -