forked from enlightenment/efl
eina-cow: fix valgrind instrumentation
This commit is contained in:
parent
07b5c33f90
commit
61c50e9d1c
|
@ -484,8 +484,15 @@ eina_cow_done(Eina_Cow *cow,
|
||||||
|
|
||||||
if (!needed_gc) return ;
|
if (!needed_gc) return ;
|
||||||
|
|
||||||
|
#ifndef NVALGRIND
|
||||||
|
VALGRIND_MAKE_MEM_DEFINED(ref, sizeof (*ref));
|
||||||
|
#endif
|
||||||
/* needed if we want to make cow gc safe */
|
/* needed if we want to make cow gc safe */
|
||||||
if (ref->togc) return ;
|
if (ref->togc) return ;
|
||||||
|
#ifndef NVALGRIND
|
||||||
|
VALGRIND_MAKE_MEM_NOACCESS(ref, sizeof (*ref));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
gc = eina_mempool_malloc(gc_pool, sizeof (Eina_Cow_GC));
|
gc = eina_mempool_malloc(gc_pool, sizeof (Eina_Cow_GC));
|
||||||
if (!gc) return ; /* That one will not get gced this time */
|
if (!gc) return ; /* That one will not get gced this time */
|
||||||
|
@ -493,10 +500,10 @@ eina_cow_done(Eina_Cow *cow,
|
||||||
gc->ref = ref;
|
gc->ref = ref;
|
||||||
gc->dst = dst;
|
gc->dst = dst;
|
||||||
eina_hash_direct_add(cow->togc, &gc->ref, gc);
|
eina_hash_direct_add(cow->togc, &gc->ref, gc);
|
||||||
ref->togc = EINA_TRUE;
|
|
||||||
#ifndef NVALGRIND
|
#ifndef NVALGRIND
|
||||||
VALGRIND_MAKE_MEM_DEFINED(ref, sizeof (*ref));
|
VALGRIND_MAKE_MEM_DEFINED(ref, sizeof (*ref));
|
||||||
#endif
|
#endif
|
||||||
|
ref->togc = EINA_TRUE;
|
||||||
#ifndef NVALGRIND
|
#ifndef NVALGRIND
|
||||||
VALGRIND_MAKE_MEM_NOACCESS(ref, sizeof (*ref));
|
VALGRIND_MAKE_MEM_NOACCESS(ref, sizeof (*ref));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue