Use the passed-in 'name' param to create a MemMap.
Change-Id: I15c33b23751f4c32cb40c9514b602845feb47f9f
Signed-off-by: Kyungmin Lee <snailee@gmail.com>
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index c2baa29..2892857 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -437,7 +437,7 @@
MemMap* Heap::MapAnonymousPreferredAddress(const char* name, uint8_t* request_begin, size_t capacity,
int prot_flags, std::string* out_error_str) {
while (true) {
- MemMap* map = MemMap::MapAnonymous(kMemMapSpaceName[0], request_begin, capacity,
+ MemMap* map = MemMap::MapAnonymous(name, request_begin, capacity,
PROT_READ | PROT_WRITE, true, out_error_str);
if (map != nullptr || request_begin == nullptr) {
return map;