Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-10 14:17:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-10 14:28:52 +0400
commit737e51cb21cc3864dca3da7e754549e08660f193 (patch)
tree531d4180781753bc9ffd0800cd2dc1c4340a6a3e /source/blender/blenlib/intern/BLI_mempool.c
parent02e378bf19d349031fb7397ccf7e26885289f34d (diff)
Mempool/Memarena: hint for unlikely conditions
Diffstat (limited to 'source/blender/blenlib/intern/BLI_mempool.c')
-rw-r--r--source/blender/blenlib/intern/BLI_mempool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index c2b54023621..1321f006e36 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -295,7 +295,7 @@ void *BLI_mempool_alloc(BLI_mempool *pool)
pool->totused++;
- if (!(pool->free)) {
+ if (UNLIKELY(pool->free == NULL)) {
/* need to allocate a new chunk */
BLI_mempool_chunk *mpchunk = mempool_chunk_alloc(pool);
mempool_chunk_add(pool, mpchunk, NULL);