From: Philippe Waroquiers Date: Sun, 3 May 2015 21:48:13 +0000 (+0000) Subject: * Out of memory message was using 'bytes have already been allocated.' X-Git-Tag: svn/VALGRIND_3_11_0~432 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=109b2f9417706e633389dd8c3550cf8711b342ff;p=thirdparty%2Fvalgrind.git * Out of memory message was using 'bytes have already been allocated.' while this nr is in fact the total anonymously mmap-ed. Change the message so as to reflect the shown number. * Show also the total anonymous mmaped in non OOM memory statistics git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15177 --- diff --git a/coregrind/m_gdbserver/server.c b/coregrind/m_gdbserver/server.c index 9b30e678a5..cf228a5fac 100644 --- a/coregrind/m_gdbserver/server.c +++ b/coregrind/m_gdbserver/server.c @@ -157,7 +157,9 @@ void VG_(print_all_stats) (Bool memory_stats, Bool tool_stats) VG_(message)(Vg_DebugMsg, "------ Valgrind's internal memory use stats follow ------\n" ); VG_(sanity_check_malloc_all)(); - VG_(message)(Vg_DebugMsg, "------\n" ); + VG_(message)(Vg_DebugMsg, + "------ %llu bytes have already been mmap-ed ANONYMOUS.\n", + VG_(am_get_anonsize_total)()); VG_(print_all_arena_stats)(); if (VG_(clo_profile_heap)) VG_(print_arena_cc_analysis) (); diff --git a/coregrind/m_mallocfree.c b/coregrind/m_mallocfree.c index 1f543c9d15..51441b87e8 100644 --- a/coregrind/m_mallocfree.c +++ b/coregrind/m_mallocfree.c @@ -758,7 +758,7 @@ void VG_(out_of_memory_NORETURN) ( const HChar* who, SizeT szB ) "\n" " Valgrind's memory management: out of memory:\n" " %s's request for %llu bytes failed.\n" - " %llu bytes have already been allocated.\n" + " %llu bytes have already been mmap-ed ANONYMOUS.\n" " Valgrind cannot continue. Sorry.\n\n" " There are several possible reasons for this.\n" " - You have some kind of memory limit in place. Look at the\n"