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

Unified Diff: runtime/vm/heap.h

Issue 11363226: Fail new space promotions only when old space is truly exhausted. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: correct growth policy default Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.h
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index fb4e92799a2426e08f45b599b209bafa1b64627a..819a80a9b7627408ea3ef5d3cb5dd562b8203a74 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -73,15 +73,22 @@ class Heap {
return 0;
}
- uword TryAllocate(intptr_t size, Space space) {
+ uword TryAllocate(
+ intptr_t size,
+ Space space,
+ PageSpace::GrowthPolicy growth_policy = PageSpace::kControlGrowth) {
ASSERT(!read_only_);
switch (space) {
case kNew:
return new_space_->TryAllocate(size);
case kOld:
- return old_space_->TryAllocate(size, HeapPage::kData);
+ return old_space_->TryAllocate(size,
+ HeapPage::kData,
+ growth_policy);
case kCode:
- return old_space_->TryAllocate(size, HeapPage::kExecutable);
+ return old_space_->TryAllocate(size,
+ HeapPage::kExecutable,
+ growth_policy);
default:
UNREACHABLE();
}
« no previous file with comments | « no previous file | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698