[bitlug] Max size of array

  • From: Peeyush Prasad <peeyush@xxxxxxxxxx>
  • To: bitlug@xxxxxxxxxxxxx
  • Date: Wed, 2 Jun 2004 18:12:21 +0530 (IST)

Hi list,
 TC, was a good occ that you sent, I got lost in the for loop expression
slightly...
 any way, let's have the next one!
ok, was trying to figure out what limits the max size of an array in a c
program...

 int main()
{
 int i;
 int arr[100000];//8'0's: compiles, 5'0's: runs
 scanf("%d",&i);
}

100000 ints is about 97 pages =~ 400KB.
ulimit -a shows my stack size limit as 8MB.
what's up??

-- P





Other related posts: