]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added DRD_(clean_memory)().
authorBart Van Assche <bvanassche@acm.org>
Tue, 10 Mar 2009 09:25:32 +0000 (09:25 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 10 Mar 2009 09:25:32 +0000 (09:25 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9339

drd/drd_load_store.h
drd/drd_main.c

index b00ba4252790ba048803673d09ea5dc3ddf5737f..19ab44f75498af5f7c8b8ef7fc3c66f881aed5f7 100644 (file)
@@ -47,6 +47,7 @@ void DRD_(trace_mem_access)(const Addr addr, const SizeT size,
                             const BmAccessTypeT access_type);
 VG_REGPARM(2) void DRD_(trace_load)(Addr addr, SizeT size);
 VG_REGPARM(2) void DRD_(trace_store)(Addr addr, SizeT size);
+void DRD_(clean_memory)(const Addr a1, const SizeT len);
 
 
 #endif //  __DRD_LOAD_STORE_H
index 4ef3bb53c5155ea10cc91f4cabceeaf9099767cd..f580a821518b7c7312bbd1a707977b7d6f23a275 100644 (file)
@@ -312,6 +312,17 @@ void drd_stop_using_nonstack_mem(const Addr a1, const SizeT len)
   drd_stop_using_mem(a1, len, False);
 }
 
+/**
+ * Discard all information DRD has about memory accesses and client objects
+ * in the specified address range.
+ */
+void DRD_(clean_memory)(const Addr a1, const SizeT len)
+{
+  const Bool is_stack_memory = DRD_(thread_address_on_any_stack)(a1);
+  drd_stop_using_mem(a1, len, is_stack_memory);
+  drd_start_using_mem(a1, len);
+}
+
 /**
  * Suppress data race reports on all addresses contained in .plt and
  * .got.plt sections inside the address range [ a, a + len [. The data in