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

Side by Side Diff: runtime/vm/heap.h

Issue 24113004: Double the default heap size on 64-bit platforms to account for all pointers taking up twice the am… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Avoid ifdef. Created 7 years, 3 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 | Annotate | Revision Log
« 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define VM_HEAP_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 enum GCReason { 48 enum GCReason {
49 kNewSpace, 49 kNewSpace,
50 kPromotionFailure, 50 kPromotionFailure,
51 kOldSpace, 51 kOldSpace,
52 kFull, 52 kFull,
53 kGCAtAlloc, 53 kGCAtAlloc,
54 kGCTestCase, 54 kGCTestCase,
55 }; 55 };
56 56
57 // Default allocation sizes in MB for the old gen and code heaps. 57 // Default allocation sizes in MB for the old gen and code heaps.
58 static const intptr_t kHeapSizeInMB = 512; 58 static const intptr_t kHeapSizeInMWords = 128;
59 static const intptr_t kHeapSizeInMB = kHeapSizeInMWords * kWordSize;
59 static const intptr_t kCodeHeapSizeInMB = 18; 60 static const intptr_t kCodeHeapSizeInMB = 18;
60 61
61 ~Heap(); 62 ~Heap();
62 63
63 uword Allocate(intptr_t size, Space space) { 64 uword Allocate(intptr_t size, Space space) {
64 ASSERT(!read_only_); 65 ASSERT(!read_only_);
65 switch (space) { 66 switch (space) {
66 case kNew: 67 case kNew:
67 // Do not attempt to allocate very large objects in new space. 68 // Do not attempt to allocate very large objects in new space.
68 if (!IsAllocatableInNewSpace(size)) { 69 if (!IsAllocatableInNewSpace(size)) {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 NoHeapGrowthControlScope(); 322 NoHeapGrowthControlScope();
322 ~NoHeapGrowthControlScope(); 323 ~NoHeapGrowthControlScope();
323 private: 324 private:
324 bool current_growth_controller_state_; 325 bool current_growth_controller_state_;
325 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); 326 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope);
326 }; 327 };
327 328
328 } // namespace dart 329 } // namespace dart
329 330
330 #endif // VM_HEAP_H_ 331 #endif // VM_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