Re: C types and memory management
Re: C types and memory management
- Subject: Re: C types and memory management
- From: Jim Correia <email@hidden>
- Date: Mon, 24 Jun 2002 17:20:26 -0400
On Monday, June 24, 2002, at 04:53 PM, Ondra Cada wrote:
Frankly, I don't know whether there is a function to get the
theoretical stack size at all; it would be difficult to compute anyway,
for -- so far as I know -- the heap and stack grow one against the
other, with a problem occurring only if they meet. With any at least
marginally normal code, they won't (the space would be -- just guessing
here! -- about a gig or so).
Looks like the default stack limit is about 1/2 MB. You should be able
to adjust it for your app with setrlimit
Jim
====
#include <stdio.h>
static int i = 0;
void test(void)
{
char s[1024];
i++;
printf("%d\n", i);
test();
}
int main (int argc, const char * argv[])
{
test();
return 0;
}
_______________________________________________
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.