Added support for threadsafe MEM_mallocN/MEM_freeN in the guardedalloc
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 6 Sep 2006 19:13:23 +0000 (19:13 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 6 Sep 2006 19:13:23 +0000 (19:13 +0000)
commite7d6537f1c5227005ccddc52987ea720ba66bc80
tree5ac48fd44121194b879fc002d369281494a7598d
parentd444f25b2864b7d4a9ae39211c695e36ffd813a8
Added support for threadsafe MEM_mallocN/MEM_freeN in the guardedalloc
module itself, replacing the special MEM_mallocT/MEM_freeT functions.
Mutex locking is only enabled when threads are running.

There was no good reason to have these separate, it just led to ugly
hacks when calling functions with non-threadsafe malloc from threads.
15 files changed:
intern/guardedalloc/MEM_guardedalloc.h
intern/guardedalloc/intern/mallocn.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/node_composite.c
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/intern/threads.c
source/blender/blenpluginapi/intern/pluginapi.c
source/blender/include/BIF_glutil.h
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/zbuf.c
source/blender/src/glutil.c