]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Changed some overflow-prone counters from UInt to ULong.
authorNicholas Nethercote <njn@valgrind.org>
Thu, 6 Oct 2005 03:32:42 +0000 (03:32 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 6 Oct 2005 03:32:42 +0000 (03:32 +0000)
Changed some printf specifiers accordingly, plus some more that were
incorrect.

Also put commas in various output numbers, eg. the leak check stats.
This makes them much easier to read when they get big.  One
exception is in XML number-only fields such as <leakedbytes>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4874

18 files changed:
coregrind/m_execontext.c
coregrind/m_scheduler/scheduler.c
coregrind/m_transtab.c
memcheck/mac_leakcheck.c
memcheck/mac_malloc_wrappers.c
memcheck/mac_shared.c
memcheck/mac_shared.h
memcheck/tests/describe-block.stderr.exp
memcheck/tests/exitprog.stderr.exp
memcheck/tests/filter_leak_check_size
memcheck/tests/memalign_test.stderr.exp
memcheck/tests/mempool.stderr.exp
memcheck/tests/mempool.stderr.exp64
memcheck/tests/nanoleak.stderr.exp
memcheck/tests/pointer-trace.stderr.exp
memcheck/tests/pointer-trace.stderr.exp2
memcheck/tests/pointer-trace.stderr.exp64
memcheck/tests/trivialleak.stderr.exp

index dcaa097e9539615aa13fcd929bf9ea5d0e72befc..a4ed1216ca7904e237ef785fba3fa03ea4e509c6 100644 (file)
@@ -64,18 +64,18 @@ static ExeContext* ec_list[N_EC_LISTS];
 
 /* Stats only: the number of times the system was searched to locate a
    context. */
-static UInt ec_searchreqs;
+static ULong ec_searchreqs;
 
 /* Stats only: the number of full context comparisons done. */
-static UInt ec_searchcmps;
+static ULong ec_searchcmps;
 
 /* Stats only: total number of stored contexts. */
-static UInt ec_totstored;
+static ULong ec_totstored;
 
 /* Number of 2, 4 and (fast) full cmps done. */
-static UInt ec_cmp2s;
-static UInt ec_cmp4s;
-static UInt ec_cmpAlls;
+static ULong ec_cmp2s;
+static ULong ec_cmp4s;
+static ULong ec_cmpAlls;
 
 
 /*------------------------------------------------------------*/
@@ -107,20 +107,18 @@ void VG_(print_ExeContext_stats) ( void )
 {
    init_ExeContext_storage();
    VG_(message)(Vg_DebugMsg, 
-      "   exectx: %d lists, %d contexts (avg %d per list)",
-      N_EC_LISTS, ec_totstored, 
-      ec_totstored / N_EC_LISTS 
+      "   exectx: %,lu lists, %,llu contexts (avg %,llu per list)",
+      N_EC_LISTS, ec_totstored, ec_totstored / N_EC_LISTS 
    );
    VG_(message)(Vg_DebugMsg, 
-      "   exectx: %d searches, %d full compares (%d per 1000)",
+      "   exectx: %,llu searches, %,llu full compares (%,llu per 1000)",
       ec_searchreqs, ec_searchcmps, 
       ec_searchreqs == 0 
-         ? 0 
-         : (UInt)( (((ULong)ec_searchcmps) * 1000) 
-           / ((ULong)ec_searchreqs )) 
+         ? 0L 
+         : ( (ec_searchcmps * 1000) / ec_searchreqs ) 
    );
    VG_(message)(Vg_DebugMsg, 
-      "   exectx: %d cmp2, %d cmp4, %d cmpAll",
+      "   exectx: %,llu cmp2, %,llu cmp4, %,llu cmpAll",
       ec_cmp2s, ec_cmp4s, ec_cmpAlls 
    );
 }
index 1b9ae9432bf5735a9d5d5c7a84c8b264c19a1d1f..5c9ec2d415bd8ffe63be43eafef351aaa694fdb9 100644 (file)
@@ -113,8 +113,8 @@ static void scheduler_sanity ( ThreadId tid );
 static void mostly_clear_thread_record ( ThreadId tid );
 
 /* Stats. */
-static UInt n_scheduling_events_MINOR = 0;
-static UInt n_scheduling_events_MAJOR = 0;
+static ULong n_scheduling_events_MINOR = 0;
+static ULong n_scheduling_events_MAJOR = 0;
 
 /* Sanity checking counts. */
 static UInt sanity_fast_count = 0;
@@ -123,9 +123,9 @@ static UInt sanity_slow_count = 0;
 void VG_(print_scheduler_stats)(void)
 {
    VG_(message)(Vg_DebugMsg,
-      "scheduler: %llu jumps (bb entries).", bbs_done );
+      "scheduler: %,llu jumps (bb entries).", bbs_done );
    VG_(message)(Vg_DebugMsg,
-      "scheduler: %d/%d major/minor sched events.", 
+      "scheduler: %,llu/%,llu major/minor sched events.", 
       n_scheduling_events_MAJOR, n_scheduling_events_MINOR);
    VG_(message)(Vg_DebugMsg, 
                 "   sanity: %d cheap, %d expensive checks.",
index d6b449b0c857d927312649be9ee7fbc7dfa3547a..3c87213e1b2c94264ee2c121258754ee21e18cda 100644 (file)
@@ -703,23 +703,23 @@ UInt VG_(get_bbs_translated) ( void )
 void VG_(print_tt_tc_stats) ( void )
 {
    VG_(message)(Vg_DebugMsg,
-      "    tt/tc: %llu tt lookups requiring %llu probes", 
+      "    tt/tc: %,llu tt lookups requiring %,llu probes", 
       n_full_lookups, n_lookup_probes );
    VG_(message)(Vg_DebugMsg,
-      "    tt/tc: %llu fast-cache updates, %llu flushes", 
+      "    tt/tc: %,llu fast-cache updates, %,llu flushes", 
       n_fast_updates, n_fast_flushes );
 
    VG_(message)(Vg_DebugMsg,
-                "translate: new        %lld "
-                "(%lld -> %lld; ratio %lld:10) [%lld scs]",
+                "translate: new        %,lld "
+                "(%,llu -> %,llu; ratio %,llu:10) [%,llu scs]",
                 n_in_count, n_in_osize, n_in_tsize,
                 safe_idiv(10*n_in_tsize, n_in_osize),
                 n_in_sc_count);
    VG_(message)(Vg_DebugMsg,
-                "translate: dumped     %lld (%lld -> ?" "?)",
+                "translate: dumped     %,llu (%,llu -> ?" "?)",
                 n_dump_count, n_dump_osize );
    VG_(message)(Vg_DebugMsg,
-                "translate: discarded  %lld (%lld -> ?" "?)",
+                "translate: discarded  %,llu (%,llu -> ?" "?)",
                 n_disc_count, n_disc_osize );
 }
 
index 1ca39b887e08222cd92562245141967b21ae90a5..84c57c7c7ffc53983f76c67d1e00d0a91259ef41 100644 (file)
@@ -144,8 +144,8 @@ typedef
       /* Their reachability. */
       Reachedness  loss_mode;
       /* Number of blocks and total # bytes involved. */
-      UInt         total_bytes;
-      UInt        indirect_bytes;
+      SizeT        total_bytes;
+      SizeT        indirect_bytes;
       UInt         num_blocks;
    }
    LossRecord;
@@ -281,8 +281,8 @@ void MAC_(pp_LeakError)(void* vextra)
 
    if (l->indirect_bytes) {
       VG_(message)(Vg_UserMsg, 
-         "%s%d (%d direct, %d indirect) bytes in %d blocks"
-         " are %s in loss record %d of %d%s",
+         "%s%,lu (%,lu direct, %,lu indirect) bytes in %,u blocks"
+         " are %s in loss record %,u of %,u%s",
          xpre,
          l->total_bytes + l->indirect_bytes, 
          l->total_bytes, l->indirect_bytes, l->num_blocks,
@@ -290,15 +290,16 @@ void MAC_(pp_LeakError)(void* vextra)
          xpost
       );
       if (VG_(clo_xml)) {
-         VG_(message)(Vg_UserMsg, "  <leakedbytes>%d</leakedbytes>", 
+         // Nb: don't put commas in these XML numbers 
+         VG_(message)(Vg_UserMsg, "  <leakedbytes>%lu</leakedbytes>", 
                                   l->total_bytes + l->indirect_bytes);
-         VG_(message)(Vg_UserMsg, "  <leakedblocks>%d</leakedblocks>", 
+         VG_(message)(Vg_UserMsg, "  <leakedblocks>%u</leakedblocks>", 
                                   l->num_blocks);
       }
    } else {
       VG_(message)(
          Vg_UserMsg, 
-         "%s%d bytes in %d blocks are %s in loss record %d of %d%s",
+         "%s%,lu bytes in %,u blocks are %s in loss record %,u of %,u%s",
          xpre,
          l->total_bytes, l->num_blocks,
          loss, extra->n_this_record, extra->n_total_records,
@@ -314,11 +315,11 @@ void MAC_(pp_LeakError)(void* vextra)
    VG_(pp_ExeContext)(l->allocated_at);
 }
 
-Int MAC_(bytes_leaked)     = 0;
-Int MAC_(bytes_indirect)   = 0;
-Int MAC_(bytes_dubious)    = 0;
-Int MAC_(bytes_reachable)  = 0;
-Int MAC_(bytes_suppressed) = 0;
+SizeT MAC_(bytes_leaked)     = 0;
+SizeT MAC_(bytes_indirect)   = 0;
+SizeT MAC_(bytes_dubious)    = 0;
+SizeT MAC_(bytes_reachable)  = 0;
+SizeT MAC_(bytes_suppressed) = 0;
 
 static Int lc_compar(void* n1, void* n2)
 {
@@ -497,11 +498,11 @@ static void lc_do_leakcheck(Int clique)
    }
 }
 
-static Int    blocks_leaked;
-static Int    blocks_indirect;
-static Int    blocks_dubious;
-static Int    blocks_reachable;
-static Int    blocks_suppressed;
+static SizeT blocks_leaked;
+static SizeT blocks_indirect;
+static SizeT blocks_dubious;
+static SizeT blocks_reachable;
+static SizeT blocks_suppressed;
 
 static void full_report(ThreadId tid)
 {
@@ -577,7 +578,7 @@ static void full_report(ThreadId tid)
    for (i = 0; i < n_lossrecords; i++) {
       Bool        print_record;
       LossRecord* p_min = NULL;
-      UInt        n_min = 0xFFFFFFFF;
+      SizeT       n_min = ~(0x0L);
       for (p = errlist; p != NULL; p = p->next) {
          if (p->num_blocks > 0 && p->total_bytes < n_min) {
             n_min = p->total_bytes + p->indirect_bytes;
@@ -715,7 +716,7 @@ void MAC_(do_detect_memory_leaks) (
 
    if (VG_(clo_verbosity) > 0 && !VG_(clo_xml))
       VG_(message)(Vg_UserMsg, 
-                   "searching for pointers to %d not-freed blocks.", 
+                   "searching for pointers to %,d not-freed blocks.", 
                    lc_n_shadows );
 
    lc_min_mallocd_addr = lc_shadows[0]->data;
@@ -773,7 +774,7 @@ void MAC_(do_detect_memory_leaks) (
    lc_do_leakcheck(-1);
 
    if (VG_(clo_verbosity) > 0 && !VG_(clo_xml))
-      VG_(message)(Vg_UserMsg, "checked %d bytes.", lc_scanned);
+      VG_(message)(Vg_UserMsg, "checked %,lu bytes.", lc_scanned);
 
    blocks_leaked     = MAC_(bytes_leaked)     = 0;
    blocks_indirect   = MAC_(bytes_indirect)   = 0;
@@ -789,16 +790,16 @@ void MAC_(do_detect_memory_leaks) (
    if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
       VG_(message)(Vg_UserMsg, "");
       VG_(message)(Vg_UserMsg, "LEAK SUMMARY:");
-      VG_(message)(Vg_UserMsg, "   definitely lost: %d bytes in %d blocks.", 
+      VG_(message)(Vg_UserMsg, "   definitely lost: %,lu bytes in %,lu blocks.",
                                MAC_(bytes_leaked), blocks_leaked );
       if (blocks_indirect > 0)
-        VG_(message)(Vg_UserMsg, "   indirectly lost: %d bytes in %d blocks.", 
+        VG_(message)(Vg_UserMsg, "   indirectly lost: %,lu bytes in %,lu blocks.",
                      MAC_(bytes_indirect), blocks_indirect );
-      VG_(message)(Vg_UserMsg, "     possibly lost: %d bytes in %d blocks.", 
+      VG_(message)(Vg_UserMsg, "     possibly lost: %,lu bytes in %,lu blocks.",
                                MAC_(bytes_dubious), blocks_dubious );
-      VG_(message)(Vg_UserMsg, "   still reachable: %d bytes in %d blocks.", 
+      VG_(message)(Vg_UserMsg, "   still reachable: %,lu bytes in %,lu blocks.",
                                MAC_(bytes_reachable), blocks_reachable );
-      VG_(message)(Vg_UserMsg, "        suppressed: %d bytes in %d blocks.", 
+      VG_(message)(Vg_UserMsg, "        suppressed: %,lu bytes in %,lu blocks.",
                                MAC_(bytes_suppressed), blocks_suppressed );
       if (mode == LC_Summary && blocks_leaked > 0)
         VG_(message)(Vg_UserMsg,
index cd9a71dd043173fd21014a7804d148275ff9b9d1..019e248c167ad2805ec5d209a7cc446f54acb31d 100644 (file)
@@ -511,7 +511,7 @@ void MAC_(mempool_free)(Addr pool, Addr addr)
 void MAC_(print_malloc_stats) ( void )
 {
    MAC_Chunk* mc;
-   UInt       nblocks = 0;
+   SizeT      nblocks = 0;
    SizeT      nbytes  = 0;
    
    if (VG_(clo_verbosity) == 0)
@@ -527,10 +527,10 @@ void MAC_(print_malloc_stats) ( void )
    }
 
    VG_(message)(Vg_UserMsg, 
-                "malloc/free: in use at exit: %d bytes in %d blocks.",
+                "malloc/free: in use at exit: %,lu bytes in %,lu blocks.",
                 nbytes, nblocks);
    VG_(message)(Vg_UserMsg, 
-                "malloc/free: %d allocs, %d frees, %u bytes allocated.",
+                "malloc/free: %,lu allocs, %,lu frees, %,lu bytes allocated.",
                 cmalloc_n_mallocs,
                 cmalloc_n_frees, cmalloc_bs_mallocd);
    if (VG_(clo_verbosity) > 1)
index fe67d040eaa9326407c7fa3f16f5825f43443bb0..2e0449e86d867621903b16af3bc4e101a5213dc6 100644 (file)
@@ -279,9 +279,9 @@ void MAC_(pp_AddrInfo) ( Addr a, AddrInfo* ai )
             relative = "inside";
          }
          VG_(message)(Vg_UserMsg, 
-            "%sAddress 0x%llx is %llu bytes %s a %s of size %d %s%s",
+            "%sAddress 0x%lx is %,lu bytes %s a %s of size %,lu %s%s",
             xpre,
-            (ULong)a, (ULong)delta, relative, kind,
+            a, delta, relative, kind,
             ai->blksize,
             ai->akind==Mallocd ? "alloc'd" 
                : ai->akind==Freed ? "free'd" 
index f937ff8009727b58088cd1776e4fea178b099f08..b62fbc5d82cc016d88978eeb49136744bc48ec37 100644 (file)
@@ -346,11 +346,11 @@ extern Bool (*MAC_(check_noaccess))( Addr a, SizeT len, Addr* bad_addr );
 extern Bool (*MAC_(describe_addr_supp))    ( Addr a, AddrInfo* ai );
 
 /* For VALGRIND_COUNT_LEAKS client request */
-extern Int MAC_(bytes_leaked);
-extern Int MAC_(bytes_indirect);
-extern Int MAC_(bytes_dubious);
-extern Int MAC_(bytes_reachable);
-extern Int MAC_(bytes_suppressed);
+extern SizeT MAC_(bytes_leaked);
+extern SizeT MAC_(bytes_indirect);
+extern SizeT MAC_(bytes_dubious);
+extern SizeT MAC_(bytes_reachable);
+extern SizeT MAC_(bytes_suppressed);
 
 /*------------------------------------------------------------*/
 /*--- Functions                                            ---*/
index 9b6e48be990e7290a9d821c876ad8fc1c2ce603f..2f1aedc3db6137e1989dca6f4d962de326f0be02 100644 (file)
@@ -1,7 +1,7 @@
 
 Invalid write of size 1
    at 0x........: main (describe-block.c:6)
- Address 0x........ is 0 bytes inside a magic foople zone of size 4096 client-defined
+ Address 0x........ is 0 bytes inside a magic foople zone of size 4,096 client-defined
    at 0x........: main (describe-block.c:5)
 
 Process terminating with default action of signal 11 (SIGSEGV)
index c1fa55be7169f635ddae1885d691380b6bcdd74f..e60319cef5b9892da01688bba64f6983fb8b3686 100644 (file)
@@ -1,5 +1,5 @@
 Invalid write of size 1
    at 0x........: main (exitprog.c:18)
- Address 0x........ is 0 bytes after a block of size 1000000 alloc'd
+ Address 0x........ is 0 bytes after a block of size 1,000,000 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (exitprog.c:15)
index 0cb482a467d7529aa03f94d3b21a340bd8d99918..ad9e2b181abcd5c30c72c5b848a9d6d57c73fd89 100755 (executable)
@@ -1,4 +1,4 @@
 #! /bin/sh
 
 ./filter_stderr |
-sed "s/checked [0-9]* bytes./checked ... bytes./"
+sed "s/checked [0-9,]* bytes./checked ... bytes./"
index a43369c6fbb20a49809dee4c944370f102191f85..4eb281cdb2e75f4c6930b4115e9093a28209d0dc 100644 (file)
@@ -1,6 +1,6 @@
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (memalign_test.c:17)
- Address 0x........ is 0 bytes inside a block of size 111110 free'd
+ Address 0x........ is 0 bytes inside a block of size 111,110 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (memalign_test.c:15)
index 39c726223366ef010794d7d744065efcdb31a150..5aebdd64bdc179b416d996142201d22fc993b282 100644 (file)
@@ -1,7 +1,7 @@
 Invalid write of size 1
    at 0x........: test (mempool.c:124)
    by 0x........: main (mempool.c:148)
- Address 0x........ is 7 bytes inside a block of size 100000 alloc'd
+ Address 0x........ is 7 bytes inside a block of size 100,000 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: make_pool (mempool.c:38)
    by 0x........: test (mempool.c:111)
@@ -10,7 +10,7 @@ Invalid write of size 1
 Invalid write of size 1
    at 0x........: test (mempool.c:125)
    by 0x........: main (mempool.c:148)
- Address 0x........ is 18 bytes inside a block of size 100000 alloc'd
+ Address 0x........ is 18 bytes inside a block of size 100,000 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: make_pool (mempool.c:38)
    by 0x........: test (mempool.c:111)
@@ -19,7 +19,7 @@ Invalid write of size 1
 Invalid write of size 1
    at 0x........: test (mempool.c:129)
    by 0x........: main (mempool.c:148)
- Address 0x........ is 70 bytes inside a block of size 100000 alloc'd
+ Address 0x........ is 70 bytes inside a block of size 100,000 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: make_pool (mempool.c:38)
    by 0x........: test (mempool.c:111)
@@ -28,14 +28,14 @@ Invalid write of size 1
 Invalid write of size 1
    at 0x........: test (mempool.c:130)
    by 0x........: main (mempool.c:148)
- Address 0x........ is 96 bytes inside a block of size 100000 alloc'd
+ Address 0x........ is 96 bytes inside a block of size 100,000 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: make_pool (mempool.c:38)
    by 0x........: test (mempool.c:111)
    by 0x........: main (mempool.c:148)
 
 
-100028 (20 direct, 100008 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 3
+100,028 (20 direct, 100,008 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 3
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: make_pool (mempool.c:37)
    by 0x........: test (mempool.c:111)
index c6703c0764fb4a4a81a1ad7dfff583ec129b5a51..afb85b78b0ee955d4d18cf00e99779bc06502888 100644 (file)
@@ -35,7 +35,7 @@ Invalid write of size 1
    by 0x........: main (mempool.c:148)
 
 
-100048 (32 direct, 100016 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 3
+100,048 (32 direct, 100,016 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 3
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: make_pool (mempool.c:37)
    by 0x........: test (mempool.c:111)
index 57fdf3c3b8761b24e39e42a6b4982dc3e43c40cb..2988ee37c02d47c60d74b2e2c14a21c953e02d34 100644 (file)
@@ -1,4 +1,4 @@
 
-1000 bytes in 1 blocks are definitely lost in loss record 1 of 1
+1,000 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (nanoleak.c:6)
index b2258477029cf1258a0fbbf1e731d00194e66051..857b2de8a80f7b5f98e019053897e88183c18234 100644 (file)
@@ -5,24 +5,24 @@ checked ... bytes.
 LEAK SUMMARY:
    definitely lost: 0 bytes in 0 blocks.
      possibly lost: 0 bytes in 0 blocks.
-   still reachable: 1048576 bytes in 1 blocks.
+   still reachable: 1,048,576 bytes in 1 blocks.
         suppressed: 0 bytes in 0 blocks.
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --show-reachable=yes
 
 ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 1048576 bytes in 1 blocks.
-malloc/free: 1 allocs, 0 frees, 1048576 bytes allocated.
+malloc/free: in use at exit: 1,048,576 bytes in 1 blocks.
+malloc/free: 1 allocs, 0 frees, 1,048,576 bytes allocated.
 For counts of detected errors, rerun with: -v
 searching for pointers to 1 not-freed blocks.
 checked ... bytes.
 
-1048576 bytes in 1 blocks are definitely lost in loss record 1 of 1
+1,048,576 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (pointer-trace.c:24)
 
 LEAK SUMMARY:
-   definitely lost: 1048576 bytes in 1 blocks.
+   definitely lost: 1,048,576 bytes in 1 blocks.
      possibly lost: 0 bytes in 0 blocks.
    still reachable: 0 bytes in 0 blocks.
         suppressed: 0 bytes in 0 blocks.
index 19f8200be5528017384f6d49b3b8487b2fa42c5c..b8a91469e1aa315f5affa28587dc02d05eba5efd 100644 (file)
@@ -6,24 +6,24 @@ LEAK SUMMARY:
    definitely lost: 0 bytes in 0 blocks.
    indirectly lost: 0 bytes in 0 blocks.
    possibly lost:   0 bytes in 0 blocks.
-   still reachable: 1048600 bytes in 2 blocks.
+   still reachable: 1,048,600 bytes in 2 blocks.
         suppressed: 0 bytes in 0 blocks.
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --show-reachable=yes
 
 ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 1048576 bytes in 1 blocks.
-malloc/free: 2 allocs, 1 frees, 1048600 bytes allocated.
+malloc/free: in use at exit: 1,048,576 bytes in 1 blocks.
+malloc/free: 2 allocs, 1 frees, 1,048,600 bytes allocated.
 For counts of detected errors, rerun with: -v
 searching for pointers to 1 not-freed blocks.
 checked ... bytes.
 
-1048576 bytes in 1 blocks are definitely lost in loss record 1 of 1
+1,048,576 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (pointer-trace.c:24)
 
 LEAK SUMMARY:
-   definitely lost: 1048576 bytes in 1 blocks.
+   definitely lost: 1,048,576 bytes in 1 blocks.
    indirectly lost: 0 bytes in 0 blocks.
    possibly lost:   0 bytes in 0 blocks.
    still reachable: 0 bytes in 0 blocks.
index 1fec492eda07397d8e6d1c51076ff90e946841ce..21a360e1192b407093d1d531f83d4b208a8ab68d 100644 (file)
@@ -5,24 +5,24 @@ checked ... bytes.
 LEAK SUMMARY:
    definitely lost: 0 bytes in 0 blocks.
      possibly lost: 0 bytes in 0 blocks.
-   still reachable: 2097152 bytes in 1 blocks.
+   still reachable: 2,097,152 bytes in 1 blocks.
         suppressed: 0 bytes in 0 blocks.
 Reachable blocks (those to which a pointer was found) are not shown.
 To see them, rerun with: --show-reachable=yes
 
 ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 2097152 bytes in 1 blocks.
-malloc/free: 1 allocs, 0 frees, 2097152 bytes allocated.
+malloc/free: in use at exit: 2,097,152 bytes in 1 blocks.
+malloc/free: 1 allocs, 0 frees, 2,097,152 bytes allocated.
 For counts of detected errors, rerun with: -v
 searching for pointers to 1 not-freed blocks.
 checked ... bytes.
 
-2097152 bytes in 1 blocks are definitely lost in loss record 1 of 1
+2,097,152 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (pointer-trace.c:24)
 
 LEAK SUMMARY:
-   definitely lost: 2097152 bytes in 1 blocks.
+   definitely lost: 2,097,152 bytes in 1 blocks.
      possibly lost: 0 bytes in 0 blocks.
    still reachable: 0 bytes in 0 blocks.
         suppressed: 0 bytes in 0 blocks.
index 1bd6e545f927bd34da383f74f33d71738838dee3..0b1f57dcb716dcde7ce40b99209b0079e595d10a 100644 (file)
@@ -1,5 +1,5 @@
 
-1000 bytes in 1000 blocks are definitely lost in loss record 1 of 1
+1,000 bytes in 1,000 blocks are definitely lost in loss record 1 of 1
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: test (trivialleak.c:8)
    by 0x........: main (trivialleak.c:12)