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

Unified Diff: runtime/vm/pages.cc

Issue 10458054: Ignore the growth policy when fragmentation prevents allocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index cbe85906dff7bd3c896207f4f7aac7ad09cf0245..965e5b984fce0d1c7aa1b86239d4359b1435eb10 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -199,7 +199,8 @@ uword PageSpace::TryAllocate(intptr_t size) {
if (result == 0) {
result = freelist_.TryAllocate(size);
if ((result == 0) &&
- page_space_controller_.CanGrowPageSpace(size) &&
+ (page_space_controller_.CanGrowPageSpace(size) ||
+ (size < (capacity() - in_use()))) && // Fragmentation
Ivan Posva 2012/05/31 23:32:53 The problem with this solution is that it has no m
CanIncreaseCapacity(kPageSize)) {
AllocatePage();
result = TryBumpAllocate(size);
« 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