Reserve boot image memory in one go.

Load boot image components into the reserved memory.

Test: m test-art-host-gtest
Test: testrunner.py --host
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Test: testrunner.py --target --optimizing
Bug: 77856493
Change-Id: I214f947979bc0bbfc6df4312527504e90b88a01d
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index b2fe441..fb19a27 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -139,11 +139,11 @@
       std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                        odex_location.c_str(),
                                                        odex_location.c_str(),
-                                                       nullptr,
-                                                       nullptr,
-                                                       false,
-                                                       /*low_4gb*/false,
+                                                       /* requested_base */ nullptr,
+                                                       /* executable */ false,
+                                                       /* low_4gb */ false,
                                                        dex_location.c_str(),
+                                                       /* reservation */ nullptr,
                                                        &error_msg));
       ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
 
@@ -159,11 +159,11 @@
         std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                          odex_location.c_str(),
                                                          odex_location.c_str(),
-                                                         nullptr,
-                                                         nullptr,
-                                                         false,
-                                                         /*low_4gb*/false,
+                                                         /* requested_base */ nullptr,
+                                                         /* executable */ false,
+                                                         /* low_4gb */ false,
                                                          dex_location.c_str(),
+                                                         /* reservation */ nullptr,
                                                          &error_msg));
         ASSERT_TRUE(odex_file.get() == nullptr);
       }
@@ -516,11 +516,11 @@
     std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                      odex_location.c_str(),
                                                      odex_location.c_str(),
-                                                     nullptr,
-                                                     nullptr,
-                                                     false,
-                                                     /*low_4gb*/false,
+                                                     /* requested_base */ nullptr,
+                                                     /* executable */ false,
+                                                     /* low_4gb */ false,
                                                      dex_location.c_str(),
+                                                     /* reservation */ nullptr,
                                                      &error_msg));
     ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
     EXPECT_GT(app_image_file.length(), 0u);
@@ -787,11 +787,11 @@
     std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                      odex_location.c_str(),
                                                      odex_location.c_str(),
-                                                     nullptr,
-                                                     nullptr,
-                                                     false,
-                                                     /*low_4gb*/false,
+                                                     /* requested_base */ nullptr,
+                                                     /* executable */ false,
+                                                     /* low_4gb */ false,
                                                      dex_location.c_str(),
+                                                     /* reservation */ nullptr,
                                                      &error_msg));
     ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
 
@@ -949,11 +949,11 @@
     std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                      odex_location.c_str(),
                                                      odex_location.c_str(),
-                                                     nullptr,
-                                                     nullptr,
-                                                     false,
-                                                     /*low_4gb*/false,
+                                                     /* requested_base */ nullptr,
+                                                     /* executable */ false,
+                                                     /* low_4gb */ false,
                                                      dex_location.c_str(),
+                                                     /* reservation */ nullptr,
                                                      &error_msg));
     ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
     ASSERT_GE(odex_file->GetOatDexFiles().size(), 1u);
@@ -1329,11 +1329,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    oat_filename.c_str(),
                                                    oat_filename.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    dex->GetLocation().c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr);
   std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1439,11 +1439,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    oat_filename.c_str(),
                                                    oat_filename.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    dex_location.c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr);
   std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1684,11 +1684,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    oat_filename.c_str(),
                                                    oat_filename.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    temp_dex.GetFilename().c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr);
   std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1762,11 +1762,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    odex_location.c_str(),
                                                    odex_location.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    dex_location.c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr);
   ASSERT_STREQ("install", odex_file->GetCompilationReason());
@@ -1788,11 +1788,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    odex_location.c_str(),
                                                    odex_location.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    dex_location.c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr);
   ASSERT_EQ(nullptr, odex_file->GetCompilationReason());
@@ -1826,11 +1826,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    odex_location.c_str(),
                                                    odex_location.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/ false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    dex_location.c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr) << dex_location;
   std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -2065,11 +2065,11 @@
   std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
                                                    odex_location.c_str(),
                                                    odex_location.c_str(),
-                                                   nullptr,
-                                                   nullptr,
-                                                   false,
-                                                   /*low_4gb*/false,
+                                                   /* requested_base */ nullptr,
+                                                   /* executable */ false,
+                                                   /* low_4gb */ false,
                                                    odex_location.c_str(),
+                                                   /* reservation */ nullptr,
                                                    &error_msg));
   ASSERT_TRUE(odex_file != nullptr);
   ImageHeader header = {};