A memory pool update from Graydon Hoare.
Here's an update to the mempool move / change client requests and sanity
checking. The following changes are present:
- Added one more (hopefully last) client request, a predicate to
test whether a mempool anchor address is currently tracked.
It turns out mozilla's arena-using code is sufficiently inconsistent
in its assumptions that it's very difficult to phrase the valgrind
client-request annotations without this request. Namely: sometime
arena-init and arena-free operations are assumed to be idempotent.
- Fixed a very rapid tool-memory leak in the mempool sanity check
routine. The previous version of the patch I posted would use all
memory even on my Very Beefy Test Machine within ~15 minutes of
browsing with firefox.
- Added a little logging code to print the counts of pools and chunks
active every ~10000 sanity checks, when running with -v.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6197 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/mc_include.h b/memcheck/mc_include.h
index 4fa50d2..23a6b2c 100644
--- a/memcheck/mc_include.h
+++ b/memcheck/mc_include.h
@@ -87,6 +87,9 @@
Addr addr, SizeT size );
extern void MC_(mempool_free) ( Addr pool, Addr addr );
extern void MC_(mempool_trim) ( Addr pool, Addr addr, SizeT size );
+extern void MC_(move_mempool) ( Addr poolA, Addr poolB );
+extern void MC_(mempool_change) ( Addr pool, Addr addrA, Addr addrB, SizeT size );
+extern Bool MC_(mempool_exists) ( Addr pool );
extern MC_Chunk* MC_(get_freed_list_head)( void );