Hello,
I am running Kernel 2.2.10-ac3 on my quad xeon with 2GM memory.
Recently it has become apparent
that I can't get access to a lot of memory as exemplified by the
following simple C program which fails on a segmentation fault:
#include <stdio.h>
static double T[80000000];
int main()
{
T[16] = 95.0;
printf("Hello\n");
return 0;
}
The above program needs about 700MB of memory. My system has 2GB of
memory and I have applied an Alan Cox patch that allows malloc to get
around 1300MB with no problem (i.e. the following program runs fine:
#include <stdio.h>
main(){
double *d;
unsigned int k,m,p;
m=8*80000000;
d = (double *) malloc(m) ;
for(k=0; k<80000000; k++) {
*(d+k) = k+1;
}
printf("k=%d f=%16.8f\n",k,*(d+k-1) );
}
I have 2GB of swap.
Any clues about how to solve this problem would be greatly appreciated.
Thanks, Bill Szkotnicki
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]