Re: Really stupid c question
Re: Really stupid c question
- Subject: Re: Really stupid c question
- From: Christopher B Hamlin <email@hidden>
- Date: Thu, 11 Apr 2002 21:47:57 -0400
On Thursday, April 11, 2002, at 02:34 PM, Andy Lee wrote:
At 12:09 PM +0200 4/11/02, Ondra Cada wrote:
On Thursday, April 11, 2002, at 11:59 , Brian Williams wrote:
When I try to make a BOOL array like this ->
BOOL test[786432] /*1024 *768 ==786432*/ it crashes. I am guessing
that I am
going out of the local memory space? or something like that.
Hmmm, is it local or global? If former, it might be the reason -- I am
not sure of the stack space, but it is quite possible there's no a
free M there. Though, there should be no problem with a global M; if
so, there would be anotehr problem too.
...
There might be a way to tweak memory settings for your program to avoid
this problem, but I don't know the low-level mechanisms to do so.
Take a look at the man page for setrlimit.
And you can avoid the stack by using malloc.
There are problem less-UNIXy ways too.
- Chris Hamlin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.