Revision: 9969
Author:   [email protected]
Date:     Fri Nov 11 04:01:18 2011
Log:      merge missing patch
http://code.google.com/p/v8/source/detail?r=9969

Modified:
 /trunk/src/zone-inl.h
 /trunk/src/zone.h

=======================================
--- /trunk/src/zone-inl.h       Tue Sep 13 01:21:47 2011
+++ /trunk/src/zone-inl.h       Fri Nov 11 04:01:18 2011
@@ -52,6 +52,14 @@
   ASSERT(ZoneScope::nesting() > 0);
   // Round up the requested size to fit the alignment.
   size = RoundUp(size, kAlignment);
+
+ // If the allocation size is divisible by 8 then we return an 8-byte aligned
+  // address.
+  if (kPointerSize == 4 && kAlignment == 4) {
+ position_ += ((~size) & 4) & (reinterpret_cast<intptr_t>(position_) & 4);
+  } else {
+    ASSERT(kAlignment >= kPointerSize);
+  }

   // Check if the requested size is available without expanding.
   Address result = position_;
=======================================
--- /trunk/src/zone.h   Mon Aug 29 03:41:00 2011
+++ /trunk/src/zone.h   Fri Nov 11 04:01:18 2011
@@ -86,7 +86,9 @@
   friend class Isolate;
   friend class ZoneScope;

-  // All pointers returned from New() have this alignment.
+ // All pointers returned from New() have this alignment. In addition, if the + // object being allocated has a size that is divisible by 8 then its alignment
+  // will be 8.
   static const int kAlignment = kPointerSize;

   // Never allocate segments smaller than this size in bytes.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to