Tim Newsham wrote:

by 4M do you mean 4*1024*1024?
Yeppers.

If you declare local variables (non-static) they are allocated
on the stack.  If you declare global variables they are either
in the BSS or data segment (depending on if they are initialized
to zeros or other values).  There are limitations on the amount
of space available on the stack.
Exactly, which is why I made them global.

I'm not familiar with limitations
in the bss/data.  However, you can avoid them, if they exist, by
allocating the data at runtime using malloc or a similar function.
In that case the data will be on the heap.
Other than the 1/2 the available memory thing (which may be the culprit), neither am I. We kind of lean away from dynamic allocation for this program. I'm trying to tweak around with sbrk() a bit to see if I can fudge things a bit.

Where in the startup does the crash occur?
When the program is loaded.  Nothing gets executed.

Thanks,
-Charles

Reply via email to