Blender Git Commit Log

Git Commits -> Revision 1a81197

Revision 1a81197 by Sergey Sharybin (master)
August 15, 2013, 12:13 (GMT)
Speedup for guarded allocator

- Re-arrange locks, so no actual memory allocation
(which is relatively slow) happens from inside
the lock. operation system will take care of locks
which might be needed there on it's own.

- Use spin lock instead of mutex, since it's just
list operations happens from inside lock, no need
in mutex here.

- Use atomic operations for memory in use and total
used blocks counters.

This makes guarded allocator almost the same speed
as non-guarded one in files from Tube project.

There're still MemHead/MemTail overhead which might
be bad for CPU cache utilization.

TODO: We need smarter 32/64bit compile-time check,
currently i'm afraid only x86 CPU family is
detecting reliably.

Commit Details:

Full Hash: 1a8119781942ef157586ae2a67288b69710e040d
SVN Revision: 59163
Parent Commit: c4f6340
Lines Changed: +45, -31

10 Modified Paths:

/intern/atomic/atomic_ops.h (+1, -0) (Diff)
/intern/guardedalloc/CMakeLists.txt (+1, -0) (Diff)
/intern/guardedalloc/intern/mallocn.c (+31, -27) (Diff)
/intern/guardedalloc/SConscript (+1, -1) (Diff)
/source/blender/blenlib/intern/threads.c (+6, -3) (Diff)
/source/blender/makesdna/intern/CMakeLists.txt (+1, -0) (Diff)
/source/blender/makesdna/intern/SConscript (+1, -0) (Diff)
/source/blender/makesrna/intern/CMakeLists.txt (+1, -0) (Diff)
/source/blender/makesrna/SConscript (+1, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021