]> sourceware.org Git - lvm2.git/commitdiff
Fix usage of DEBUG_ENFORCE_POOL_LOCKING with DEBUG_MEM
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 23 Oct 2011 15:38:02 +0000 (15:38 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Sun, 23 Oct 2011 15:38:02 +0000 (15:38 +0000)
Since DEBUG_MEM is storing own extra structure within returned memory chunk,
glibc free must be used directly for posix_memaling() allocated block.

WHATS_NEW_DM
libdm/mm/pool-fast.c

index da0b43bffa7786135381675846ccd0b874db0c39..79be18f28f9ce1764a731848994f1662cc5778a9 100644 (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.
index 491c142078161f001cb7c2c0d483b168827b5d25..dd41b6ece2d98a16470d885d8b0a150c0c752af5 100644 (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
 }
 
 
This page took 0.038773 seconds and 5 git commands to generate.