diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-07-28 00:06:37 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-07-28 00:06:37 +0000 |
commit | 2c1c9dfe806d62d43768b23c29799dc6a100cb09 (patch) | |
tree | b71ef9bb47e6a786b3233873c4b8a4fd25bf21aa /memcheck/mc_main.c | |
parent | 3cf26a56b250f752eec91ffadfd52ec40aa2d715 (diff) |
Add a mempool-trimming client request (Graydon Hoare).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5992 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'memcheck/mc_main.c')
-rw-r--r-- | memcheck/mc_main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 0e3096f9..026356b6 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -4053,7 +4053,8 @@ static Bool mc_handle_client_request ( ThreadId tid, UWord* arg, UWord* ret ) && VG_USERREQ__CREATE_MEMPOOL != arg[0] && VG_USERREQ__DESTROY_MEMPOOL != arg[0] && VG_USERREQ__MEMPOOL_ALLOC != arg[0] - && VG_USERREQ__MEMPOOL_FREE != arg[0]) + && VG_USERREQ__MEMPOOL_FREE != arg[0] + && VG_USERREQ__MEMPOOL_TRIM != arg[0]) return False; switch (arg[0]) { @@ -4219,6 +4220,15 @@ static Bool mc_handle_client_request ( ThreadId tid, UWord* arg, UWord* ret ) return True; } + case VG_USERREQ__MEMPOOL_TRIM: { + Addr pool = (Addr)arg[1]; + Addr addr = (Addr)arg[2]; + UInt size = arg[3]; + + MC_(mempool_trim) ( pool, addr, size ); + return True; + } + default: VG_(message)(Vg_UserMsg, "Warning: unknown memcheck client request code %llx", |