[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60557] trunk/blender/source/blender/ blenlib/intern: more corrections to valgrind hinting.

Campbell Barton ideasman42 at gmail.com
Sat Oct 5 06:59:43 CEST 2013


Revision: 60557
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60557
Author:   campbellbarton
Date:     2013-10-05 04:59:43 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
more corrections to valgrind hinting.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/BLI_memarena.c
    trunk/blender/source/blender/blenlib/intern/BLI_mempool.c

Modified: trunk/blender/source/blender/blenlib/intern/BLI_memarena.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_memarena.c	2013-10-05 04:38:08 UTC (rev 60556)
+++ trunk/blender/source/blender/blenlib/intern/BLI_memarena.c	2013-10-05 04:59:43 UTC (rev 60557)
@@ -86,6 +86,11 @@
 void BLI_memarena_free(MemArena *ma)
 {
 	BLI_linklist_freeN(ma->bufs);
+
+#ifdef WITH_MEM_VALGRIND
+	VALGRIND_DESTROY_MEMPOOL(ma);
+#endif
+
 	MEM_freeN(ma);
 }
 

Modified: trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_mempool.c	2013-10-05 04:38:08 UTC (rev 60556)
+++ trunk/blender/source/blender/blenlib/intern/BLI_mempool.c	2013-10-05 04:59:43 UTC (rev 60557)
@@ -570,6 +570,11 @@
 	ListBase chunks_temp;
 	BLI_freenode *lasttail = NULL;
 
+#ifdef WITH_MEM_VALGRIND
+	VALGRIND_DESTROY_MEMPOOL(pool);
+	VALGRIND_CREATE_MEMPOOL(pool, 0, false);
+#endif
+
 	if (totelem_reserve == -1) {
 		maxchunks = pool->maxchunks;
 	}




More information about the Bf-blender-cvs mailing list