summaryrefslogtreecommitdiffstats
path: root/vm/alloc/Verify.h
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2010-03-16 03:26:49 -0700
committerCarl Shapiro <cshapiro@google.com>2010-03-16 15:36:22 -0700
commit1e714bbd8230ac6fb9e3a8e9e25bca687132c82a (patch)
tree2ae9527afc12fd1b6f5ef2397e8478f684b48f36 /vm/alloc/Verify.h
parent4a24408f2a572505b6d2c2d2247f4ef7977152f7 (diff)
downloadandroid_dalvik-1e714bbd8230ac6fb9e3a8e9e25bca687132c82a.tar.gz
android_dalvik-1e714bbd8230ac6fb9e3a8e9e25bca687132c82a.tar.bz2
android_dalvik-1e714bbd8230ac6fb9e3a8e9e25bca687132c82a.zip
Import the heap verification code from the copying collector. The
reference verification routine adds an extra argument so the base address of an object can be passed to the verification code without provoking a warning from GCC about breaking alias analysis. Change-Id: Idd921bcc0e084c18bff1e209a8591ef55f57843a
Diffstat (limited to 'vm/alloc/Verify.h')
-rw-r--r--vm/alloc/Verify.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/vm/alloc/Verify.h b/vm/alloc/Verify.h
new file mode 100644
index 000000000..2409ad12a
--- /dev/null
+++ b/vm/alloc/Verify.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DALVIK_ALLOC_VERIFY
+#define _DALVIK_ALLOC_VERIFY
+
+/*
+ * Verifies an object reference.
+ */
+void dvmVerifyObject(const Object *obj);
+
+/*
+ * Verifies the object references in a heap bitmap. Assumes the heap
+ * is locked.
+ */
+void dvmVerifyBitmapUnlocked(const HeapBitmap *bitmap);
+
+/*
+ * Verifies the object references in a heap bitmap. Suspends the VM
+ * for the duration of verification.
+ */
+void dvmVerifyBitmap(const HeapBitmap *bitmap);
+
+#endif /* _DALVIK_ALLOC_VERIFY */