为什么mmap()
返回 64 位地址而malloc()
返回 32 位地址?
char *a = (char *)mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
printf("%p\n", a); // example: 0x7fbfbb065000
char *b = (char *)malloc(10); // example: 0x23bf010
printf("%p\n", b);