diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-03-30 12:43:32 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-03-30 12:43:32 +0000 |
commit | 01fb91c615ef70d23318db1b6d317fcb8f11f12f (patch) | |
tree | f131110630bd1e7a2e05eb656af241eb36d0f5f2 /libdm/mm | |
parent | e3cce4b66aac0470ffcf18602957cc2dbd081666 (diff) | |
download | lvm2-01fb91c615ef70d23318db1b6d317fcb8f11f12f.tar.gz lvm2-01fb91c615ef70d23318db1b6d317fcb8f11f12f.tar.xz lvm2-01fb91c615ef70d23318db1b6d317fcb8f11f12f.zip |
Valgrind updates
Avoid locking sum testing with valgrind compilation.
Make memory unaccessible in the valgrind for dm_pool_abadon_object.
Valgrind hinting should not be needed in _free_chunk for dm_free.
Diffstat (limited to 'libdm/mm')
-rw-r--r-- | libdm/mm/pool-fast.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libdm/mm/pool-fast.c b/libdm/mm/pool-fast.c index 377ad99c..b651449f 100644 --- a/libdm/mm/pool-fast.c +++ b/libdm/mm/pool-fast.c @@ -238,6 +238,9 @@ void *dm_pool_end_object(struct dm_pool *p) void dm_pool_abandon_object(struct dm_pool *p) { +#ifdef VALGRIND_POOL + VALGRIND_MAKE_MEM_NOACCESS(p->chunk, p->object_len); +#endif p->object_len = 0; p->object_alignment = DEFAULT_ALIGNMENT; } @@ -278,11 +281,5 @@ static struct chunk *_new_chunk(struct dm_pool *p, size_t s) static void _free_chunk(struct chunk *c) { - if (c) { -#ifdef VALGRIND_POOL - VALGRIND_MAKE_MEM_UNDEFINED(c, c->end - (char *) c); -#endif - - dm_free(c); - } + dm_free(c); } |