Chromium Code Reviews| 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); |