Some changes affect the list element and others affect the pool stats.
Better group them together, as the compiler may not detect certain
possible optimizations after the casts made by the list macros.
}
item = LIST_NEXT(&ph->list, typeof(item), by_pool);
- ph->count--;
- pool_cache_bytes -= pool->size;
- pool_cache_count--;
LIST_DELETE(&item->by_pool);
LIST_DELETE(&item->by_lru);
/* keep track of where the element was allocated from */
POOL_DEBUG_SET_MARK(pool, item);
+
+ ph->count--;
+ pool_cache_bytes -= pool->size;
+ pool_cache_count--;
+
return item;
}