Index: coregrind/m_aspacemgr/aspacemgr.c =================================================================== --- coregrind/m_aspacemgr/aspacemgr.c (revision 4302) +++ coregrind/m_aspacemgr/aspacemgr.c (working copy) @@ -1252,8 +1252,8 @@ vg_assert(r == -1); #endif - r = VG_(mprotect_native)( (void*)try_here, - size, VKI_PROT_READ|VKI_PROT_WRITE ); + r = VG_(mmap_native)( (void *)try_here, size, VKI_PROT_READ|VKI_PROT_WRITE, + VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS|VKI_MAP_FIXED, -1, 0 ); if (r.isError) goto failed; Index: coregrind/m_main.c =================================================================== --- coregrind/m_main.c (revision 4302) +++ coregrind/m_main.c (working copy) @@ -262,30 +262,6 @@ // Make client hole res = VG_(munmap_native)((void*)VG_(client_base), client_size); vg_assert(!res.isError); - - // Map shadow memory. - // Initially all inaccessible, incrementally initialized as it is used - if (shadow_size != 0) { - res = VG_(mmap_native)((char *)VG_(shadow_base), shadow_size, - VKI_PROT_NONE, - VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS|VKI_MAP_FIXED|VKI_MAP_NORESERVE, - -1, 0); - if (res.isError) { - fprintf(stderr, - "valgrind: Could not allocate address space (%p bytes)\n" - "valgrind: for shadow memory\n" - "valgrind: Possible causes:\n" - "valgrind: - For some systems (especially under RedHat 8), Valgrind\n" - "valgrind: needs at least 1.5GB swap space.\n" - "valgrind: - Or, your virtual memory size may be limited (check\n" - "valgrind: with 'ulimit -v').\n" - "valgrind: - Or, your system may use a kernel that provides only a\n" - "valgrind: too-small (eg. 2GB) user address space.\n" - , (void*)shadow_size - ); - exit(1); - } - } } /*====================================================================*/