From c0f8e15295371ae69b38185d3ee5659cdd1af386 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 19 Aug 2013 10:51:40 +0000 Subject: 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 --- intern/guardedalloc/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'intern/guardedalloc/CMakeLists.txt') diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index 4f6c177ef7d..7ac978b0edd 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -25,6 +25,7 @@ set(INC . + ../atomic ) set(INC_SYS -- cgit v1.2.3