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

Side by Side Diff: runtime/vm/pages.cc

Issue 864843002: Remove default heap size limit and add separate limit for externals. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | « runtime/vm/pages.h ('k') | runtime/vm/pages_test.cc » ('j') | 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 #include "vm/pages.h" 5 #include "vm/pages.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/compiler_stats.h" 8 #include "vm/compiler_stats.h"
9 #include "vm/gc_marker.h" 9 #include "vm/gc_marker.h"
10 #include "vm/gc_sweeper.h" 10 #include "vm/gc_sweeper.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 prot = VirtualMemory::kReadOnly; 126 prot = VirtualMemory::kReadOnly;
127 } 127 }
128 } else { 128 } else {
129 prot = VirtualMemory::kReadWrite; 129 prot = VirtualMemory::kReadWrite;
130 } 130 }
131 bool status = memory_->Protect(prot); 131 bool status = memory_->Protect(prot);
132 ASSERT(status); 132 ASSERT(status);
133 } 133 }
134 134
135 135
136 PageSpace::PageSpace(Heap* heap, intptr_t max_capacity_in_words) 136 PageSpace::PageSpace(Heap* heap,
137 intptr_t max_capacity_in_words,
138 intptr_t max_external_in_words)
137 : freelist_(), 139 : freelist_(),
138 heap_(heap), 140 heap_(heap),
139 pages_lock_(new Mutex()), 141 pages_lock_(new Mutex()),
140 pages_(NULL), 142 pages_(NULL),
141 pages_tail_(NULL), 143 pages_tail_(NULL),
142 exec_pages_(NULL), 144 exec_pages_(NULL),
143 exec_pages_tail_(NULL), 145 exec_pages_tail_(NULL),
144 large_pages_(NULL), 146 large_pages_(NULL),
145 bump_top_(0), 147 bump_top_(0),
146 bump_end_(0), 148 bump_end_(0),
147 max_capacity_in_words_(max_capacity_in_words), 149 max_capacity_in_words_(max_capacity_in_words),
150 max_external_in_words_(max_external_in_words),
148 tasks_lock_(new Monitor()), 151 tasks_lock_(new Monitor()),
149 tasks_(0), 152 tasks_(0),
150 page_space_controller_(heap, 153 page_space_controller_(heap,
151 FLAG_old_gen_growth_space_ratio, 154 FLAG_old_gen_growth_space_ratio,
152 FLAG_old_gen_growth_rate, 155 FLAG_old_gen_growth_rate,
153 FLAG_old_gen_growth_time_ratio), 156 FLAG_old_gen_growth_time_ratio),
154 gc_time_micros_(0), 157 gc_time_micros_(0),
155 collections_(0) { 158 collections_(0) {
156 } 159 }
157 160
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 return 0; 1108 return 0;
1106 } else { 1109 } else {
1107 ASSERT(total_time >= gc_time); 1110 ASSERT(total_time >= gc_time);
1108 int result = static_cast<int>((static_cast<double>(gc_time) / 1111 int result = static_cast<int>((static_cast<double>(gc_time) /
1109 static_cast<double>(total_time)) * 100); 1112 static_cast<double>(total_time)) * 100);
1110 return result; 1113 return result;
1111 } 1114 }
1112 } 1115 }
1113 1116
1114 } // namespace dart 1117 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/pages_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698