OSDN Git Service

Temporarily disable LOS on 64 bit
authorMathieu Chartier <mathieuc@google.com>
Tue, 9 Sep 2014 02:49:50 +0000 (19:49 -0700)
committerMathieu Chartier <mathieuc@google.com>
Tue, 9 Sep 2014 02:52:01 +0000 (19:52 -0700)
Problem is that MAP_32BIT simulation can take seconds on large object
allocations in the worst case.

Bug: 17414549

Change-Id: I463bb0b728eed14847a32a27a93640ec6080f6b3

runtime/gc/heap.h

index d3d613f..7304887 100644 (file)
@@ -129,8 +129,12 @@ class Heap {
   // If true, measure the total allocation time.
   static constexpr bool kMeasureAllocationTime = false;
   // Primitive arrays larger than this size are put in the large object space.
+#ifdef __LP64__
+  // Temporarily disable LOS on 64 bit until MAP_32BIT performance issues are fixed. b/17414549
+  static constexpr size_t kDefaultLargeObjectThreshold = 0xFFFFFFFFU;
+#else
   static constexpr size_t kDefaultLargeObjectThreshold = 3 * kPageSize;
-
+#endif
   static constexpr size_t kDefaultStartingSize = kPageSize;
   static constexpr size_t kDefaultInitialSize = 2 * MB;
   static constexpr size_t kDefaultMaximumSize = 256 * MB;