|
From: Nicholas N. <nj...@ca...> - 2004-08-30 19:36:54
|
CVS commit by nethercote:
Print a message if shadow memory cannot be allocated, rather than just
asserting.
M +7 -1 vg_main.c 1.198 [POSSIBLY UNSAFE: printf]
--- valgrind/coregrind/vg_main.c #1.197:1.198
@@ -495,5 +495,11 @@ static void layout_remaining_space(Addr
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);
+ }
}
}
|