[mpich2-commits] r5507 - mpich2/trunk/src/util/mem

goodell at mcs.anl.gov goodell at mcs.anl.gov
Tue Oct 20 15:35:42 CDT 2009


Author: goodell
Date: 2009-10-20 15:35:42 -0500 (Tue, 20 Oct 2009)
New Revision: 5507

Modified:
   mpich2/trunk/src/util/mem/trmem.c
Log:
Quiet valgrind false positives in MPIU_trdump.

No reviewer.

Modified: mpich2/trunk/src/util/mem/trmem.c
===================================================================
--- mpich2/trunk/src/util/mem/trmem.c	2009-10-20 20:35:41 UTC (rev 5506)
+++ mpich2/trunk/src/util/mem/trmem.c	2009-10-20 20:35:42 UTC (rev 5507)
@@ -561,6 +561,7 @@
 void MPIU_trdump( FILE *fp, int minid )
 {
     TRSPACE *head;
+    TRSPACE *old_head;
     char    hexstring[MAX_ADDRESS_CHARS];
 
     /* Synchronization is needed because the TRhead and associated
@@ -570,6 +571,7 @@
     if (fp == 0) fp = stderr;
     head = TRhead;
     while (head) {
+        MPIU_VG_MAKE_MEM_DEFINED(head, sizeof(*head));
 	if (head->id >= minid) {
 	    addrToHex( (char *)head + sizeof(TrSPACE), hexstring );
 	    FPRINTF( fp, "[%d] %lu at [%s], ", 
@@ -585,7 +587,9 @@
 		FPRINTF( fp, "%s[%d]\n", head->fname, head->lineno );
 	    }
 	}
+        old_head = head;
 	head = head->next;
+        MPIU_VG_MAKE_MEM_NOACCESS(old_head, sizeof(*old_head));
     }
 /*
     msg_fprintf( fp, "# [%d] The maximum space allocated was %ld bytes [%ld]\n", 



More information about the mpich2-commits mailing list