|
From: Robert W. <rj...@du...> - 2005-07-10 07:49:12
|
> Is there any way to let Valgrind know that a function other than > malloc, calloc etc. is a function which allocates a block of memory? There are two ways of doing this. Both involve using client requests. The first way is to use VALGRIND_MALLOCLIKE_BLOCK and VALGRIND_FREELIKE_BLOCK. The second is to use VALGRIND_CREATE_MEMPOOL, VALGRIND_DESTROY_MEMPOOL, VALGRIND_MEMPOOL_ALLOC and VALGRIND_MEMPOOL_FREE. Both mechanisms are documented here: http://www.valgrind.org/docs/manual/coregrind_core.html#clientreq although the mempool stuff needs way more documentation (mea culpa) and I usually just point people at the example in memcheck/tests/mempool.c. If you have any questions about the mempool stuff after reading this file, drop me a line. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |