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

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, 4 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/tests/vm/vm.status ('k') | runtime/vm/assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/allocation.cc
===================================================================
--- runtime/vm/allocation.cc (revision 10253)
+++ 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)) {
+ FATAL1("ZoneAllocated object has unexpectedly large size %uld", size);
+ }
+ return reinterpret_cast<void*>(isolate->current_zone()->AllocUnsafe(size));
}
} // namespace dart
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698