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

Unified Diff: vm/heap.h

Issue 8996011: - Trigger old-gen GCs when needed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years 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 | « vm/gc_sweeper.cc ('k') | vm/heap.cc » ('j') | vm/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap.h
===================================================================
--- vm/heap.h (revision 2587)
+++ vm/heap.h (working copy)
@@ -8,6 +8,7 @@
#include "vm/allocation.h"
#include "vm/flags.h"
#include "vm/globals.h"
+#include "vm/pages.h"
namespace dart {
@@ -40,6 +41,10 @@
uword Allocate(intptr_t size, Space space) {
switch (space) {
case kNew:
+ // Do not attempt to allocate very large objects in new space.
+ if (!PageSpace::IsPageAllocatableSize(size)) {
+ return AllocateOld(size);
+ }
return AllocateNew(size);
case kOld:
return AllocateOld(size);
« no previous file with comments | « vm/gc_sweeper.cc ('k') | vm/heap.cc » ('j') | vm/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698