1 Sep 2010 10:34
Re: mmap on sparc64
Bruno Haible <bruno <at> clisp.org>
2010-09-01 08:34:48 GMT
2010-09-01 08:34:48 GMT
Hi Sam, Re: http://sourceforge.net/tracker/?func=detail&atid=101355&aid=3032296&group_id=1355 > -O0 -DSAFETY=3 has the same problem. OK, then the next step to get around Cannot map memory to address 0x4000000000000 . [../src/spvw_mmap.d:347] errno = EINVAL: Invalid argument. or Cannot map memory to address 0x333333756000 . [../src/spvw_mmap.d:347] errno = EINVAL: Invalid argument. is to determine which addresses are possible. ===================================== test-mmap.c ============================= #include <sys/types.h> #include <sys/mman.h> #include <unistd.h> #include <stdio.h> void try (void* address) { if (mmap (address, 8192, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0) == (void*)(-1)) printf ("%p failed\n", address); else printf ("%p succeeded\n", address); } int main () { try((void*)0x100000000L); try((void*)0x200000000L); try((void*)0x400000000L); try((void*)0x800000000L);(Continue reading)
RSS Feed