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

Unified Diff: dart/runtime/vm/zone.h

Issue 849893002: Version 1.8.5 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 5 years, 11 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 | « dart/runtime/vm/globals.h ('k') | dart/runtime/vm/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/zone.h
===================================================================
--- dart/runtime/vm/zone.h (revision 42827)
+++ dart/runtime/vm/zone.h (working copy)
@@ -67,6 +67,7 @@
large_segments_(NULL),
handles_(),
previous_(NULL) {
+ ASSERT(Utils::IsAligned(position_, kAlignment));
#ifdef DEBUG
// Zap the entire initial buffer.
memset(initial_buffer_.pointer(), kZapUninitializedByte,
@@ -84,7 +85,7 @@
}
// All pointers returned from AllocateUnsafe() and New() have this alignment.
- static const intptr_t kAlignment = kWordSize;
+ static const intptr_t kAlignment = kDoubleSize;
// Default initial chunk size.
static const intptr_t kInitialChunkSize = 1 * KB;
@@ -121,7 +122,8 @@
// This would act as the initial stack allocated chunk so that we don't
// end up calling malloc/free on zone scopes that allocate less than
// kChunkSize
- uint8_t buffer_[kInitialChunkSize];
+ COMPILE_ASSERT(kAlignment <= 8);
+ ALIGN8 uint8_t buffer_[kInitialChunkSize];
MemoryRegion initial_buffer_;
// The free region in the current (head) segment or the initial buffer is
« no previous file with comments | « dart/runtime/vm/globals.h ('k') | dart/runtime/vm/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698