[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60073] branches/soc-2013-depsgraph_mt/ intern/guardedalloc: scons + mingw Compile Fixes for r.59942

Joshua Leung aligorith at gmail.com
Thu Sep 12 15:29:07 CEST 2013


Revision: 60073
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60073
Author:   aligorith
Date:     2013-09-12 13:29:07 +0000 (Thu, 12 Sep 2013)
Log Message:
-----------
scons + mingw Compile Fixes for r.59942

* SCons files for guardedalloc module requires all the source files to be listed out, like in CMake.

* mingw32 (or at least gcc 4.6.2) seems to follow the Windows convention of using _msize() instead of having a "malloc_usable_size()"

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/intern/guardedalloc/SConscript
    branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_intern.h

Modified: branches/soc-2013-depsgraph_mt/intern/guardedalloc/SConscript
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/guardedalloc/SConscript	2013-09-12 13:01:36 UTC (rev 60072)
+++ branches/soc-2013-depsgraph_mt/intern/guardedalloc/SConscript	2013-09-12 13:29:07 UTC (rev 60073)
@@ -29,7 +29,12 @@
 
 defs = []
 
-sources = ['intern/mallocn.c', 'intern/mmap_win.c']
+sources = [
+    'intern/mallocn.c', 
+    'intern/mallocn_guarded_impl.c',
+	'intern/mallocn_lockfree_impl.c',
+    'intern/mmap_win.c'
+]
 
 if env['WITH_BF_CXX_GUARDEDALLOC']:
     sources.append('cpp/mallocn.cpp')

Modified: branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_intern.h
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_intern.h	2013-09-12 13:01:36 UTC (rev 60072)
+++ branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_intern.h	2013-09-12 13:29:07 UTC (rev 60073)
@@ -51,12 +51,13 @@
 
 #undef HAVE_MALLOC_STATS
 
-#if defined(__linux__) || defined(__MINGW32__)
+#if defined(__linux__)
 #  include <malloc.h>
 #  define HAVE_MALLOC_STATS
 #elif defined(__APPLE__)
 #  define malloc_usable_size malloc_size
-#elif defined(_MSC_VER)
+#elif defined(WIN32)
+#  include <malloc.h>
 #  define malloc_usable_size _msize
 #else
 #  error "We don't know how to use malloc_usable_size on your platform"




More information about the Bf-blender-cvs mailing list