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

Unified Diff: vm/heap.h

Issue 9027017: - Promote objects from new gen to old space if they survived a scavenge. (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 | « no previous file | vm/intrinsifier_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap.h
===================================================================
--- vm/heap.h (revision 2792)
+++ vm/heap.h (working copy)
@@ -6,17 +6,17 @@
#define VM_HEAP_H_
#include "vm/allocation.h"
+#include "vm/assert.h"
#include "vm/flags.h"
#include "vm/globals.h"
#include "vm/pages.h"
+#include "vm/scavenger.h"
namespace dart {
// Forward declarations.
class Isolate;
class ObjectPointerVisitor;
-class PageSpace;
-class Scavenger;
class VirtualMemory;
DECLARE_FLAG(bool, verbose_gc);
@@ -56,6 +56,19 @@
return 0;
}
+ uword TryAllocate(intptr_t size, Space space) {
+ switch (space) {
+ case kNew:
+ return new_space_->TryAllocate(size);
+ case kOld:
+ return old_space_->TryAllocate(size);
+ case kExecutable:
+ return code_space_->TryAllocate(size);
+ default:
+ UNREACHABLE();
+ }
+ }
+
// Heap contains the specified address.
bool Contains(uword addr) const;
bool CodeContains(uword addr) const;
« no previous file with comments | « no previous file | vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698