Can I malloc a space larger than 3G?
We know that a process memory space is limited by 4G (1G for kernel).
I am thinking if I can malloc a space larger than 3G. So I tried the following:
AND It works! But the print out result isn't that nice.....
char* x = (char*)malloc(3*1024*1024*1024);
Anybody knows why?
I also tried
This time compiler complains for its size. So I guess the implementations of malloc and char are different, right?