diff --git a/ww/generic_pool.h b/ww/generic_pool.h index db2d282..8dc9087 100644 --- a/ww/generic_pool.h +++ b/ww/generic_pool.h @@ -75,7 +75,7 @@ static inline pool_item_t *popPoolItem(generic_pool_t *pool) pool->in_use += 1; #endif - if (pool->len > 0) + if (WW_LIKELY(pool->len > 0)) { --(pool->len); return pool->available[pool->len]; diff --git a/ww/master_pool.h b/ww/master_pool.h index 026285b..c647bac 100644 --- a/ww/master_pool.h +++ b/ww/master_pool.h @@ -17,31 +17,31 @@ |-----------| | | | | - | | -------------> |---------------| - | | | Worker 1 pools| - | | <------------- |---------------| + | | -------------> |----------------| + | | | Worker 1 pools | + | | <------------- |----------------| | | | | | | | | - | | -------------> |---------------| - | | | Worker 2 pools| - | | <------------- |---------------| + | | -------------> |----------------| + | | | Worker 2 pools | + | | <------------- |----------------| |-----------| | | | Malloc | -----------> | MASTER | | -------- | | | | Free | <----------- | POOL | |-----------| | | - | | -------------> |---------------| - | | | Worker 3 pools| - | | <------------- |---------------| + | | -------------> |----------------| + | | | Worker 3 pools | + | | <------------- |----------------| | | | | | | | | - | | -------------> |---------------| - | | | Worker 4 pools| - | | <------------- |---------------| + | | -------------> |----------------| + | | | Worker 4 pools | + | | <------------- |----------------| | | | | |-----------|