Don't use free list LOS for --force-determinism.
If the maximum capacity is too large, we can fail mapping the memory
required for it. See:
https://android-build.googleplex.com/builds/pending/P4254206/aosp_arm64-eng/latest)
So instead just disable the LOS.
Also fix concurrent collector assuming there is always a LOS.
Test: build
bug: 37442966
Change-Id: I9d23e02fbfbce014f1da79bddaea8161e735b867
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 9fd42d2..58f3948 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -2433,8 +2433,8 @@
// which uses an unstarted runtime.
raw_options.push_back(std::make_pair("-Xgc:nonconcurrent", nullptr));
- // Also force the free-list implementation for large objects.
- raw_options.push_back(std::make_pair("-XX:LargeObjectSpace=freelist", nullptr));
+ // The default LOS implementation (map) is not deterministic. So disable it.
+ raw_options.push_back(std::make_pair("-XX:LargeObjectSpace=disabled", nullptr));
// We also need to turn off the nonmoving space. For that, we need to disable HSpace
// compaction (done above) and ensure that neither foreground nor background collectors