Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: maximal stack size



I don't know the answer to your question, but...

On Wednesday, October 16, 2002, at 12:46 PM, Jianquan Chen wrote:

I'm trying to port a UNIX program to Darwin. The program has a big
array. If the array is small, it runs good. If I set the array very big,
it failed to run. The error message is segmentation fault.

What makes you think that the stack size is at fault?

Although I
use setrlimit to increase the stacksize, I still get the same problem. I
tried the limit command in the tcsh, it looked that I can get up to
65536k byte of stack. Is there any way to get a stack size above 65536k
bytes?

If it really *is* stack related, you might try allocating your array from the heap instead. I did that on Solaris once when the compiler complained about some segment being too large, I think...it was a couple of years ago.
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.




References: 
 >maximal stack size (From: "Jianquan Chen" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.