| Index: src/zone/zone.cc
|
| diff --git a/src/zone/zone.cc b/src/zone/zone.cc
|
| index 7228081d7d75825d362229d5a28c4f2312700373..bd20032680067e191a1651d1460849fab5ae6aa6 100644
|
| --- a/src/zone/zone.cc
|
| +++ b/src/zone/zone.cc
|
| @@ -91,6 +91,9 @@ void* Zone::New(size_t size) {
|
|
|
| // Check that the result has the proper alignment and return it.
|
| DCHECK(IsAddressAligned(result, kAlignment, 0));
|
| + if (kPointerSize == 4 && kAlignment == 4) {
|
| + DCHECK((size & 4) || IsAddressAligned(result, 8, 0));
|
| + }
|
| allocation_size_ += size;
|
| return reinterpret_cast<void*>(result);
|
| }
|
| @@ -173,6 +176,9 @@ Address Zone::NewExpand(size_t size) {
|
|
|
| // Recompute 'top' and 'limit' based on the new segment.
|
| Address result = RoundUp(segment->start(), kAlignment);
|
| + if (kPointerSize == 4 && kAlignment == 4) {
|
| + result += ((~size) & 4) & (reinterpret_cast<intptr_t>(result) & 4);
|
| + }
|
| position_ = result + size;
|
| // Check for address overflow.
|
| // (Should not happen since the segment is guaranteed to accomodate
|
|
|