return NULL;
}
-static inline void __pool_free(struct pool_head *pool, void *ptr)
+static inline void pool_put_to_shared_cache(struct pool_head *pool, void *ptr)
{
_HA_ATOMIC_DEC(&pool->used);
_HA_ATOMIC_DEC(&pool->allocated);
* Both the pool and the pointer must be valid. Use pool_free() for normal
* operations.
*/
-static inline void __pool_free(struct pool_head *pool, void *ptr)
+static inline void pool_put_to_shared_cache(struct pool_head *pool, void *ptr)
{
void **free_list = pool->free_list;
/* unconditionally stores the object as-is into the global pool. The object
* must not be NULL. Use pool_free() instead.
*/
-static inline void __pool_free(struct pool_head *pool, void *ptr)
+static inline void pool_put_to_shared_cache(struct pool_head *pool, void *ptr)
{
#ifndef DEBUG_UAF /* normal pool behaviour */
HA_SPIN_LOCK(POOL_LOCK, &pool->lock);
return;
}
#endif
- __pool_free(pool, ptr);
+ pool_put_to_shared_cache(pool, ptr);
}
}
ph->count--;
pool_cache_count--;
pool_cache_bytes -= pool->size;
- __pool_free(pool, item);
+ pool_put_to_shared_cache(pool, item);
} while (pool_cache_bytes > CONFIG_HAP_POOL_CACHE_SIZE * 7 / 8);
}
#endif