Mark memory as accessable before popping it from stack.

When we push a memory to the trash stack we mark it as unaccessable. So we
should mark it as accessible before returning it to the user.



SVN revision: 53427
This commit is contained in:
Rafael Fonseca 2010-10-14 19:24:00 +00:00
parent 4bd0432caf
commit 9733a55c22
1 changed files with 7 additions and 2 deletions

View File

@ -192,8 +192,13 @@ eina_chained_mempool_malloc(void *data, __UNUSED__ unsigned int size)
p->last = NULL;
}
else
// Request a free pointer
mem = eina_trash_pop(&p->base);
{
#ifndef NVALGRIND
VALGRIND_MAKE_MEM_DEFINED(p->base, pool->item_alloc);
#endif
// Request a free pointer
mem = eina_trash_pop(&p->base);
}
// move to end - it just filled up
if (!p->base && !p->last)