diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-05 08:59:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-05 08:59:43 +0400 |
commit | 48013e8a9c82f4178ab054fa35bdbd9248417409 (patch) | |
tree | 1b1d4689c35da744e8030556447dea80e7e38e23 /source | |
parent | 2621d77f393b5c92111fc422eea83f6252f99464 (diff) |
more corrections to valgrind hinting.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/BLI_memarena.c | 5 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_mempool.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c index 6b845bf842e..4a6712201a9 100644 --- a/source/blender/blenlib/intern/BLI_memarena.c +++ b/source/blender/blenlib/intern/BLI_memarena.c @@ -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); } diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index b7f90f01c82..4ceb29831e2 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -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; } |