more corrections to valgrind hinting.

This commit is contained in:
Campbell Barton
2013-10-05 04:59:43 +00:00
parent 2621d77f39
commit 48013e8a9c
2 changed files with 10 additions and 0 deletions

View File

@@ -86,6 +86,11 @@ void BLI_memarena_use_align(struct MemArena *ma, const int align)
void BLI_memarena_free(MemArena *ma)
{
BLI_linklist_freeN(ma->bufs);
#ifdef WITH_MEM_VALGRIND
VALGRIND_DESTROY_MEMPOOL(ma);
#endif
MEM_freeN(ma);
}

View File

@@ -570,6 +570,11 @@ void BLI_mempool_clear_ex(BLI_mempool *pool, const int totelem_reserve)
ListBase chunks_temp;
BLI_freenode *lasttail = NULL;
#ifdef WITH_MEM_VALGRIND
VALGRIND_DESTROY_MEMPOOL(pool);
VALGRIND_CREATE_MEMPOOL(pool, 0, false);
#endif
if (totelem_reserve == -1) {
maxchunks = pool->maxchunks;
}