--------------------- PatchSet 10409 Date: 2008/01/15 11:40:22 Author: adri Branch: s27_adri Tag: (none) Log: Upgrade valgrind code. Members: libmem/MemPool.c:1.1.2.1->1.1.2.2 Index: squid/libmem/MemPool.c =================================================================== RCS file: /cvsroot/squid-sf//squid/libmem/Attic/MemPool.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/libmem/MemPool.c 6 Dec 2007 06:34:38 -0000 1.1.2.1 +++ squid/libmem/MemPool.c 15 Jan 2008 11:40:22 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: MemPool.c,v 1.1.2.1 2007/12/06 06:34:38 adri Exp $ + * $Id: MemPool.c,v 1.1.2.2 2008/01/15 11:40:22 adri Exp $ * * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov @@ -257,16 +257,16 @@ gb_inc(&TheMeter.saved, pool->obj_size); obj = stackPop(&pool->pstack); #if DEBUG_MEMPOOL - (void) VALGRIND_MAKE_READABLE(obj, pool->real_obj_size + sizeof(struct mempool_cookie)); + (void) VALGRIND_MAKE_MEM_DEFINED(obj, pool->real_obj_size + sizeof(struct mempool_cookie)); #else - (void) VALGRIND_MAKE_READABLE(obj, pool->obj_size); + (void) VALGRIND_MAKE_MEM_DEFINED(obj, pool->obj_size); #endif #if DEBUG_MEMPOOL { struct mempool_cookie *cookie = (void *) (((unsigned char *) obj) + pool->real_obj_size); assert(cookie->cookie == MEMPOOL_COOKIE(obj)); assert(cookie->pool == pool); - (void) VALGRIND_MAKE_NOACCESS(cookie, sizeof(cookie)); + (void) VALGRIND_MAKE_MEM_NOACCESS(cookie, sizeof(cookie)); } #endif } else { @@ -280,7 +280,7 @@ cookie = (struct mempool_cookie *) (((unsigned char *) obj) + pool->real_obj_size); cookie->cookie = MEMPOOL_COOKIE(obj); cookie->pool = pool; - (void) VALGRIND_MAKE_NOACCESS(cookie, sizeof(cookie)); + (void) VALGRIND_MAKE_MEM_NOACCESS(cookie, sizeof(cookie)); } #else if (MemPoolCfg.zero_buffers || pool->flags.dozero) @@ -299,11 +299,11 @@ memMeterDec(pool->meter.inuse); memMeterDel(TheMeter.inuse, pool->obj_size); MemPoolStats.mem_pool_free_calls++; - (void) VALGRIND_CHECK_WRITABLE(obj, pool->obj_size); + (void) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(obj, pool->obj_size); #if DEBUG_MEMPOOL { struct mempool_cookie *cookie = (void *) (((unsigned char *) obj) + pool->real_obj_size); - (void) VALGRIND_MAKE_READABLE(cookie, sizeof(cookie)); + (void) VALGRIND_MAKE_MEM_DEFINED(cookie, sizeof(cookie)); assert(cookie->cookie == MEMPOOL_COOKIE(obj)); assert(cookie->pool == pool); } @@ -314,9 +314,9 @@ if (MemPoolCfg.zero_buffers || pool->flags.dozero) memset(obj, 0, pool->obj_size); #if DEBUG_MEMPOOL - (void) VALGRIND_MAKE_NOACCESS(obj, pool->real_obj_size + sizeof(struct mempool_cookie)); + (void) VALGRIND_MAKE_MEM_NOACCESS(obj, pool->real_obj_size + sizeof(struct mempool_cookie)); #else - (void) VALGRIND_MAKE_NOACCESS(obj, pool->obj_size); + (void) VALGRIND_MAKE_MEM_NOACCESS(obj, pool->obj_size); #endif stackPush(&pool->pstack, obj); } else {