mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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
df0200e510
commit
3bdcf7c5e6
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.68 -
|
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.
|
Aling size of structure chunk for fast pool allocator to 8 bytes.
|
||||||
Simplify some pointer operations in dm_free_aux() debug code.
|
Simplify some pointer operations in dm_free_aux() debug code.
|
||||||
Remove unused dbg_malloc.h file from source tree.
|
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)
|
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);
|
dm_free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user