Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/heap/heap.h

Issue 960213007: Don't apply pointer multipler to heap sizes on Android. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1079
1080 inline intptr_t OldGenerationCapacityAvailable() { 1080 inline intptr_t OldGenerationCapacityAvailable() {
1081 return max_old_generation_size_ - PromotedTotalSize(); 1081 return max_old_generation_size_ - PromotedTotalSize();
1082 } 1082 }
1083 1083
1084 static const intptr_t kMinimumOldGenerationAllocationLimit = 1084 static const intptr_t kMinimumOldGenerationAllocationLimit =
1085 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); 1085 8 * (Page::kPageSize > MB ? Page::kPageSize : MB);
1086 1086
1087 static const int kInitalOldGenerationLimitFactor = 2; 1087 static const int kInitalOldGenerationLimitFactor = 2;
1088 1088
1089 #if V8_OS_ANDROID
1090 // Don't apply pointer multiplier on Android since it has no swap space and
1091 // should instead adapt it's heap size based on available physical memory.
1092 static const int kPointerMultiplier = 1;
1093 #else
1089 static const int kPointerMultiplier = i::kPointerSize / 4; 1094 static const int kPointerMultiplier = i::kPointerSize / 4;
1095 #endif
1090 1096
1091 // The new space size has to be a power of 2. Sizes are in MB. 1097 // The new space size has to be a power of 2. Sizes are in MB.
1092 static const int kMaxSemiSpaceSizeLowMemoryDevice = 1 * kPointerMultiplier; 1098 static const int kMaxSemiSpaceSizeLowMemoryDevice = 1 * kPointerMultiplier;
1093 static const int kMaxSemiSpaceSizeMediumMemoryDevice = 4 * kPointerMultiplier; 1099 static const int kMaxSemiSpaceSizeMediumMemoryDevice = 4 * kPointerMultiplier;
1094 static const int kMaxSemiSpaceSizeHighMemoryDevice = 8 * kPointerMultiplier; 1100 static const int kMaxSemiSpaceSizeHighMemoryDevice = 8 * kPointerMultiplier;
1095 static const int kMaxSemiSpaceSizeHugeMemoryDevice = 8 * kPointerMultiplier; 1101 static const int kMaxSemiSpaceSizeHugeMemoryDevice = 8 * kPointerMultiplier;
1096 1102
1097 // The old space size has to be a multiple of Page::kPageSize. 1103 // The old space size has to be a multiple of Page::kPageSize.
1098 // Sizes are in MB. 1104 // Sizes are in MB.
1099 static const int kMaxOldSpaceSizeLowMemoryDevice = 128 * kPointerMultiplier; 1105 static const int kMaxOldSpaceSizeLowMemoryDevice = 128 * kPointerMultiplier;
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2577 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2572 2578
2573 private: 2579 private:
2574 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2580 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2575 }; 2581 };
2576 #endif // DEBUG 2582 #endif // DEBUG
2577 } 2583 }
2578 } // namespace v8::internal 2584 } // namespace v8::internal
2579 2585
2580 #endif // V8_HEAP_HEAP_H_ 2586 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698