summaryrefslogtreecommitdiffstats
path: root/vm/alloc/Alloc.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-08-10 11:04:41 -0700
committerElliott Hughes <enh@google.com>2011-08-10 11:04:41 -0700
commitda866eadb221236c2d46b790489a15ac829bd61e (patch)
treea6335ebf5a232427d314ae74676f8aa4a93cfbb4 /vm/alloc/Alloc.cpp
parent76166696d18dc019b9ab6ccf212f9420df143c51 (diff)
downloadandroid_dalvik-da866eadb221236c2d46b790489a15ac829bd61e.tar.gz
android_dalvik-da866eadb221236c2d46b790489a15ac829bd61e.tar.bz2
android_dalvik-da866eadb221236c2d46b790489a15ac829bd61e.zip
Take the heap lock in dvmIsHeapAddress.
Bug: 5049447 Change-Id: I9df6e4116efa44088d37ac0ff4455a7876535e1e
Diffstat (limited to 'vm/alloc/Alloc.cpp')
-rw-r--r--vm/alloc/Alloc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/vm/alloc/Alloc.cpp b/vm/alloc/Alloc.cpp
index 7755f11b8..b37b9e1cc 100644
--- a/vm/alloc/Alloc.cpp
+++ b/vm/alloc/Alloc.cpp
@@ -350,7 +350,10 @@ size_t dvmCountAssignableInstancesOfClass(const ClassObject *clazz)
bool dvmIsHeapAddress(void *address)
{
- return dvmHeapSourceContainsAddress(address);
+ dvmLockHeap();
+ bool result = dvmHeapSourceContainsAddress(address);
+ dvmUnlockHeap();
+ return result;
}
bool dvmIsNonMovingObject(const Object* object)