Refactor MemMap::MapAnonymous().
Remove the address argument from the shortcut overload and
introduce one more shortcut overload. This makes it easier
to find all uses where we pass non-null address hint.
Remove `requested_begin` parameter from some constructors
where we were always passing null. Rewrite some tests to
use the reservation API.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 118408378
Change-Id: Ibbbb96667e7cc11cf7fea119892463d8dbc9a8b5
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 7fa5607..8ac7450 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1160,8 +1160,10 @@
reinterpret_cast<uint8_t*>(kSentinelAddr),
kPageSize,
PROT_NONE,
- /* low_4gb= */ true,
- /* error_msg= */ nullptr);
+ /*low_4gb=*/ true,
+ /*reuse=*/ false,
+ /*reservation=*/ nullptr,
+ /*error_msg=*/ nullptr);
if (!protected_fault_page_.IsValid()) {
LOG(WARNING) << "Could not reserve sentinel fault page";
} else if (reinterpret_cast<uintptr_t>(protected_fault_page_.Begin()) != kSentinelAddr) {