diff options
| author | 2014-08-25 16:32:41 -0700 | |
|---|---|---|
| committer | 2014-08-26 10:16:05 -0700 | |
| commit | c44ce2e9e88443d931443aa7ee738e4c43e1a12d (patch) | |
| tree | 661249817132581e25447dad5c4cb4452ad5f3d1 | |
| parent | b7fbafdac8cf0ff8f860e6e85646d6c88d3914ed (diff) | |
Map heap maps at a lower address.
We now map the heap mmaps at a lower address in case the app needs
larger continuous address space.
Bug: 16502380
(cherry picked from commit 18bacb60e09fa8aa20ae0a1d7a4a8968d4913fb0)
Change-Id: I66447f853e439448c72923e2d1c657c94c5f1543
| -rw-r--r-- | runtime/gc/heap.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index e857b25583..42c7cca66b 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -258,6 +258,8 @@ Heap::Heap(size_t initial_size, size_t growth_limit, size_t min_free, size_t max MemMap::MapAnonymous("non moving space", requested_alloc_space_begin, non_moving_space_capacity, PROT_READ | PROT_WRITE, true, &error_str)); CHECK(non_moving_space_mem_map != nullptr) << error_str; + // Try to reserve virtual memory at a lower address if we have a separate non moving space. + request_begin = reinterpret_cast<byte*>(0x1000000); } // Attempt to create 2 mem maps at or after the requested begin. main_mem_map_1.reset(MapAnonymousPreferredAddress(kMemMapSpaceName[0], request_begin, capacity_, |