Beispiel #1
0
static void
mc_action_free_entries(struct mc_tpart *part, struct mm_stack *victims)
{
	while (!mm_stack_empty(victims)) {
		struct mm_slink *link = mm_stack_remove(victims);
		struct mc_entry *entry = containerof(link, struct mc_entry, link);
		if (mc_action_unref_entry(entry)) {
			mc_action_free_chunks(part, entry);
			mc_action_free_entry(part, entry);
		}
	}
}
Beispiel #2
0
mm_pool_local_alloc(struct mm_pool *pool)
{
	ENTER();
	void *item;

	if (!mm_stack_empty(&pool->free_list))
		item = mm_stack_remove(&pool->free_list);
	else
		item = mm_pool_alloc_new(pool);

	LEAVE();
	return item;
}