• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C types and memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: C types and memory management (From: Ondra Cada <email@hidden>)

  • Prev by Date: [How] Get AppLaunched and AppDied Notifications in a CFPlugin?
  • Next by Date: Re: math.h and floats.
  • Previous by thread: Re: C types and memory management
  • Next by thread: Re: Mixing Carbon events & Cocoa
  • Index(es):
    • Date
    • Thread