1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Fix usage of DEBUG_ENFORCE_POOL_LOCKING with DEBUG_MEM

Since DEBUG_MEM is storing own extra structure within returned memory chunk,
glibc free must be used directly for posix_memaling() allocated block.
This commit is contained in:
Zdenek Kabelac 2011-10-23 15:38:02 +00:00
parent 3b704b8e5d
commit 48d03bb158
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.68 -
==================================
Fix compile-time pool memory locking with DEBUG_MEM.
Fix valgrind error reports in free of pool chunks with DEBUG_MEM.
Align size of structure chunk for fast pool allocator to 8 bytes.
Simplify some pointer operations in dm_free_aux() debug code.

View File

@ -306,7 +306,12 @@ static void _free_chunk(struct chunk *c)
VALGRIND_MAKE_MEM_UNDEFINED(c + 1, c->end - (char *) (c + 1));
# endif
#endif
#ifdef DEBUG_ENFORCE_POOL_LOCKING
/* since DEBUG_MEM is using own memory list */
free(c); /* for posix_memalign() */
#else
dm_free(c);
#endif
}