How much memory can all the processes allocate all together?
I wrote the following program and ran 3 instances of the same program concurrently.
unsigned long int i =0;
if(malloc(100000) == NULL)
}// end while
}// end main
When I ran the program, each instances terminated as
Which means each instances can allocate around 3GB of memory successfully at the same time, which is totalling to 9GB.
But the actual RAM is 512 and swap is 1GB.
How is this possible?
From where could it allocate 9GB, when the available space is 1.5 GB( RAM + SWAP)?