2 GB memory limit Hi all,
i read that Linux enables a process to use 3 GB of user space memory.
But on my (redhat 8.0, 2.4.18-14bigmem) box it seems impossible to use
more than 2 GB. Have I forgot anything to set up my system to use the
full 3 GB?
Any help appreciated
Helge
PS demo program:
#include <iostream>
using namespace std;
int main () {
int ** dummy = new int * [8];
// this loop should run min. 5, maybe 6 times, but it doesn't:
for (int i = 0; i < 8; i++) {
cout << i+1 << "*512 MB ";
dummy[i] = (int *)malloc (1024*1024*512); // alloc 512 MB
if (dummy[i]) {
dummy[i][1024*1024*127] = 0; // access mem
cout << "ok" << endl; // success
}
else {
cout << "failed!" << endl;
return 0;
}
}
return 0;
}
Its output is:
1*512 MB ok
2*512 MB ok
3*512 MB ok
4*512 MB ok
5*512 MB failed! |