Hi,
I'm trying to define a >64 MB array in C and compiling with GCC. It compiles OK, but then seg faults "Segmenation Fault: 11". I read else where that this is because the default stack size (kb) with 8192. I tried bumping this limit up using ulimit, getrlimit, and a few others and it won't permit me to grow it beyond 64 MB. Also, setting stack_size in the linker fails for anything above 64 MB.
I come from Linux, and am new to Mac. My experience with Linux is that stack size is limited to something like the physical memory size and I've never had a problem with GCC like this before. There's something I'm missing here with Mac, but why can't I make an array > 64 MB? is there an easy solution that doesn't involve recompiling the kernel?
I'm running Mac OS X 10.7.2, gcc 4.2.1 that is distributed with Xcode.
If anyone could help here, I would be grateful.
Thanks.
I'm trying to define a >64 MB array in C and compiling with GCC. It compiles OK, but then seg faults "Segmenation Fault: 11". I read else where that this is because the default stack size (kb) with 8192. I tried bumping this limit up using ulimit, getrlimit, and a few others and it won't permit me to grow it beyond 64 MB. Also, setting stack_size in the linker fails for anything above 64 MB.
I come from Linux, and am new to Mac. My experience with Linux is that stack size is limited to something like the physical memory size and I've never had a problem with GCC like this before. There's something I'm missing here with Mac, but why can't I make an array > 64 MB? is there an easy solution that doesn't involve recompiling the kernel?
I'm running Mac OS X 10.7.2, gcc 4.2.1 that is distributed with Xcode.
If anyone could help here, I would be grateful.
Thanks.