I watched a testcase for linux. it test for mmap
like follows:
#define HIGH_ADDR (void *)(0x1000000000000)
addr = mmap(HIGH_ADDR, map_sz, PROT_READ,
MAP_SHARED | MAP_FIXED, fildes, 0);
In that case under PPC64, the Expected results is get an errno ENOMEM
.
But Actual results under PPC64 is get an errno Invalid argument
.
Anyway, it works well on X86_64 arch.
I think maybe the PPC64 haven't assigned enough memory. So, I try to modify the HIGH_ADDR
's define to:
#define HIGH_ADDR (void *)(0x7FFFFFFFFFF)
But it still get Invalid argument
.
I just want to konw, How the linux for PPC64 manage his memory. I mean, I want to know the userspace program's memory geography. Or what's the MAX address Should I use.