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

Unified Diff: runtime/vm/pages.cc

Issue 792163003: Deletion barrier preparation: validate overwritten references. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 12 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 | « runtime/vm/pages.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
===================================================================
--- runtime/vm/pages.cc (revision 42583)
+++ runtime/vm/pages.cc (working copy)
@@ -880,6 +880,23 @@
}
+uword PageSpace::TryAllocateSmiInitializedLocked(intptr_t size,
+ GrowthPolicy growth_policy) {
+ uword result = TryAllocateDataBumpLocked(size, growth_policy);
+ if (collections() != 0) {
+ FATAL1("%" Pd " GCs before TryAllocateSmiInitializedLocked", collections());
+ }
+#if defined(DEBUG)
+ RawObject** begin = reinterpret_cast<RawObject**>(result);
+ RawObject** end = reinterpret_cast<RawObject**>(result + size);
+ for (RawObject** current = begin; current < end; ++current) {
+ ASSERT(!(*current)->IsHeapObject());
+ }
+#endif
+ return result;
+}
+
+
PageSpaceController::PageSpaceController(Heap* heap,
int heap_growth_ratio,
int heap_growth_max,
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698