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

Unified Diff: runtime/vm/allocation.cc

Issue 10836061: Change the zone allocation api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
Index: runtime/vm/allocation.cc
===================================================================
--- runtime/vm/allocation.cc (revision 10080)
+++ runtime/vm/allocation.cc (working copy)
@@ -18,7 +18,10 @@
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL);
ASSERT(isolate->current_zone() != NULL);
- return reinterpret_cast<void*>(isolate->current_zone()->Allocate(size));
+ if (size > static_cast<uword>(kIntptrMax)) {
cshapiro 2012/08/01 23:24:59 Why is this fatal?
+ FATAL1("ZoneAllocated object has unexpectedly large size %uld", size);
+ }
+ return reinterpret_cast<void*>(isolate->current_zone()->AllocUnsafe(size));
cshapiro 2012/08/01 23:24:59 Just curious: what is the behavior of new when the
}
} // namespace dart
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/assembler.h » ('j') | runtime/vm/zone.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698