Print a message if shadow memory cannot be allocated, rather than just
asserting.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2629 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 0b28677..70b8dfb 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -494,7 +494,13 @@
    if (shadow_size != 0) {
       vres = mmap((char *)VG_(shadow_base), shadow_size, PROT_NONE,
                   MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
-      vg_assert((void*)-1 != vres);
+      if ((void*)-1 == vres) {
+         fprintf(stderr, 
+          "valgrind: Couldn't allocate address space for shadow memory\n"
+          "valgrind: Are you using a kernel with a small user address space,\n"
+          "valgrind: or do you have your virtual memory size limited?\n");
+         exit(1);
+      }
    }
 }