summaryrefslogtreecommitdiff
path: root/runtime/gc/allocator/rosalloc.cc
diff options
context:
space:
mode:
author Hiroshi Yamauchi <yamauchi@google.com> 2016-03-23 14:22:34 -0700
committer Hiroshi Yamauchi <yamauchi@google.com> 2016-03-23 15:31:21 -0700
commitfc067bfbcd00c65917b0a2f0964d7b40bd847903 (patch)
treec53f57359f077975576d9eb4c342a0885ab6f7a8 /runtime/gc/allocator/rosalloc.cc
parent2e89e901b9f303549f3ba64e45d87292e9c986c8 (diff)
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. (cherrypick commit c867a275aa7a132ec1fd4f3b8c27812bda61ea73) Bug: 27744947 Bug: 9986565 Change-Id: I8ac3fd23719e5cfcce7e5715a03f40701f3ff339
Diffstat (limited to 'runtime/gc/allocator/rosalloc.cc')
-rw-r--r--runtime/gc/allocator/rosalloc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/gc/allocator/rosalloc.cc b/runtime/gc/allocator/rosalloc.cc
index 2c487fe8df..2a55a43660 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];