mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-09 01:18:39 +03:00
Mark chunk memory for free as defined again for valgrind
When DEBUG_MEM is used, the memory is trashed with extra pattern before real free() is called, and as this memory was marked as non accessible when used with valgrind, make it again usable.
This commit is contained in:
parent
9c1f0f4aef
commit
04275a672a
@ -1,5 +1,6 @@
|
||||
Version 1.02.68 -
|
||||
==================================
|
||||
Fix valgrind error reports in free of pool chunks with DEBUG_MEM.
|
||||
Aling size of structure chunk for fast pool allocator to 8 bytes.
|
||||
Simplify some pointer operations in dm_free_aux() debug code.
|
||||
Remove unused dbg_malloc.h file from source tree.
|
||||
|
@ -300,6 +300,12 @@ static struct chunk *_new_chunk(struct dm_pool *p, size_t s)
|
||||
|
||||
static void _free_chunk(struct chunk *c)
|
||||
{
|
||||
#ifdef VALGRIND_POOL
|
||||
# ifdef DEBUG_MEM
|
||||
if (c)
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(c + 1, c->end - (char *) (c + 1));
|
||||
# endif
|
||||
#endif
|
||||
dm_free(c);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user