|
From: <sv...@va...> - 2015-05-03 21:48:21
|
Author: philippe
Date: Sun May 3 22:48:13 2015
New Revision: 15177
Log:
* 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
Modified:
trunk/coregrind/m_gdbserver/server.c
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Sun May 3 22:48:13 2015
@@ -157,7 +157,9 @@
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) ();
Modified: trunk/coregrind/m_mallocfree.c
==============================================================================
--- trunk/coregrind/m_mallocfree.c (original)
+++ trunk/coregrind/m_mallocfree.c Sun May 3 22:48:13 2015
@@ -758,7 +758,7 @@
"\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"
|