Use ashmem to name our various anonymous regions.
Change-Id: If64576b831a2fdcb83ffce40e6ec8ece8d902672
diff --git a/src/heap_bitmap.cc b/src/heap_bitmap.cc
index ebe4e0b..4bd191a 100644
--- a/src/heap_bitmap.cc
+++ b/src/heap_bitmap.cc
@@ -22,9 +22,9 @@
namespace art {
-HeapBitmap* HeapBitmap::Create(byte* base, size_t length) {
+HeapBitmap* HeapBitmap::Create(const char* name, byte* base, size_t length) {
UniquePtr<HeapBitmap> bitmap(new HeapBitmap(base, length));
- if (!bitmap->Init(base, length)) {
+ if (!bitmap->Init(name, base, length)) {
return NULL;
} else {
return bitmap.release();
@@ -34,10 +34,10 @@
// Initialize a HeapBitmap so that it points to a bitmap large enough
// to cover a heap at <base> of <max_size> bytes, where objects are
// guaranteed to be kAlignment-aligned.
-bool HeapBitmap::Init(const byte* base, size_t max_size) {
+bool HeapBitmap::Init(const char* name, const byte* base, size_t max_size) {
CHECK(base != NULL);
size_t length = HB_OFFSET_TO_INDEX(max_size) * kWordSize;
- mem_map_.reset(MemMap::Map(length, PROT_READ | PROT_WRITE));
+ mem_map_.reset(MemMap::Map(name, NULL, length, PROT_READ | PROT_WRITE));
if (mem_map_.get() == NULL) {
return false;
}