diff options
| author | Carl Shapiro <cshapiro@google.com> | 2011-03-11 17:54:58 -0800 |
|---|---|---|
| committer | Carl Shapiro <cshapiro@google.com> | 2011-03-11 17:54:58 -0800 |
| commit | 2494c5038e668add68c74dea83aca05187a89e7c (patch) | |
| tree | 48a5d21d9b2733a6eae3f13e740bcd7d8ff238ab /vm | |
| parent | ec2a40a791625da91cb57a674e9f240af09455bd (diff) | |
| download | android_dalvik-2494c5038e668add68c74dea83aca05187a89e7c.tar.gz android_dalvik-2494c5038e668add68c74dea83aca05187a89e7c.tar.bz2 android_dalvik-2494c5038e668add68c74dea83aca05187a89e7c.zip | |
Add a predicate that returns true for addresses contained by the heap.
Change-Id: Iaa2978c59fc314563555b14f53bdc28be6b71cc4
Diffstat (limited to 'vm')
| -rw-r--r-- | vm/alloc/Alloc.c | 5 | ||||
| -rw-r--r-- | vm/alloc/Alloc.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/vm/alloc/Alloc.c b/vm/alloc/Alloc.c index 5d814b3bc..8269290a3 100644 --- a/vm/alloc/Alloc.c +++ b/vm/alloc/Alloc.c @@ -340,3 +340,8 @@ size_t dvmCountAssignableInstancesOfClass(const ClassObject *clazz) dvmUnlockHeap(); return ctx.count; } + +bool dvmIsHeapAddress(void *address) +{ + return dvmHeapSourceContainsAddress(address); +} diff --git a/vm/alloc/Alloc.h b/vm/alloc/Alloc.h index 4222ee44a..2dc2ae62d 100644 --- a/vm/alloc/Alloc.h +++ b/vm/alloc/Alloc.h @@ -137,4 +137,9 @@ size_t dvmCountAssignableInstancesOfClass(const ClassObject *clazz); */ void dvmClearGrowthLimit(void); +/* + * Returns true if the address is within the bounds of the heap. + */ +bool dvmIsHeapAddress(void *address); + #endif /*_DALVIK_ALLOC_ALLOC*/ |
