[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59615] trunk/blender/intern/guardedalloc/ intern/mallocn.c: correct own recent commit, malloc_usable_size() isn' t valid for mmap()'d memory.

Campbell Barton ideasman42 at gmail.com
Thu Aug 29 00:12:41 CEST 2013


Revision: 59615
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59615
Author:   campbellbarton
Date:     2013-08-28 22:12:40 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
correct own recent commit, malloc_usable_size() isn't valid for mmap()'d memory.

Modified Paths:
--------------
    trunk/blender/intern/guardedalloc/intern/mallocn.c

Modified: trunk/blender/intern/guardedalloc/intern/mallocn.c
===================================================================
--- trunk/blender/intern/guardedalloc/intern/mallocn.c	2013-08-28 21:50:13 UTC (rev 59614)
+++ trunk/blender/intern/guardedalloc/intern/mallocn.c	2013-08-28 22:12:40 UTC (rev 59615)
@@ -649,8 +649,10 @@
 		pb++;
 
 #ifdef HAVE_MALLOC_H
-		mem_in_use_slop += (sizeof(MemHead) + sizeof(MemTail) +
-		                    malloc_usable_size((void *)membl)) - membl->len;
+		if (!membl->mmap) {
+			mem_in_use_slop += (sizeof(MemHead) + sizeof(MemTail) +
+			                    malloc_usable_size((void *)membl)) - membl->len;
+		}
 #endif
 
 		if (membl->next)




More information about the Bf-blender-cvs mailing list