From a16ff3c138747fc7ff62e11f1c85a3698c966559 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Wed, 23 Mar 2016 10:54:59 -0700 Subject: [PATCH] Use smaller rosalloc run sizes. Use 1/1/1/2/4 instead of 1/4/8/16/32 to save memory footprint. No regressions in BinaryTrees, Ritz MemAlocTest, Ritz EAAC. Bug: 27744947 Bug: 9986565 Change-Id: If26dfae073df86b8c6e6b411c22e50cd808599ef --- runtime/gc/allocator/rosalloc.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/gc/allocator/rosalloc.cc b/runtime/gc/allocator/rosalloc.cc index 2c487fe8d..2a55a4366 100644 --- a/runtime/gc/allocator/rosalloc.cc +++ b/runtime/gc/allocator/rosalloc.cc @@ -1653,14 +1653,14 @@ void RosAlloc::Initialize() { if (i < kNumThreadLocalSizeBrackets) { numOfPages[i] = 1; } else if (i < (kNumThreadLocalSizeBrackets + kNumRegularSizeBrackets) / 2) { - numOfPages[i] = 4; + numOfPages[i] = 1; } else if (i < kNumRegularSizeBrackets) { - numOfPages[i] = 8; + numOfPages[i] = 1; } else if (i == kNumOfSizeBrackets - 2) { - numOfPages[i] = 16; + numOfPages[i] = 2; } else { DCHECK_EQ(i, kNumOfSizeBrackets - 1); - numOfPages[i] = 32; + numOfPages[i] = 4; } if (kTraceRosAlloc) { LOG(INFO) << "numOfPages[" << i << "]=" << numOfPages[i]; -- 2.11.0