]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Improve error message.
authorNicholas Nethercote <n.nethercote@gmail.com>
Fri, 8 Oct 2004 14:02:57 +0000 (14:02 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Fri, 8 Oct 2004 14:02:57 +0000 (14:02 +0000)
MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2737

coregrind/vg_main.c

index aac4411634a656e6fefcb2a90a3bae5dd4c0b2cd..80edcffa1a17f06df37a56faba0f562c0db7bedb 100644 (file)
@@ -489,9 +489,17 @@ static void layout_remaining_space(Addr argc_addr, float ratio)
                   MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
       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");
+          "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);
       }
    }