On Feb 21, 2005, at 3:28 PM, Bob Green wrote:
I get a segmentation fault when a C program allocates an 8MB array in the subroutine "main()". The specifics are listed below. Any help understanding if this is a bug would be greatly appreciated.
No this is not a bug, you are allocating the 8MB on the stack.
The stack size on ppc-darwin before 7 is only 512K though the stacksize
on ppc-darwin after 7 is 8M, you will still not be able to run the program
as there is overhead.
You need to either change the stack size limit or allocate it on the heap.
-- Pinski