| Index: src/heap/spaces-inl.h
|
| diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
|
| index 70548881302a6bfcfa50cde440dd8f8cce3339c5..f7367650ebb24974226fe5a45e11dbdcb83be9e7 100644
|
| --- a/src/heap/spaces-inl.h
|
| +++ b/src/heap/spaces-inl.h
|
| @@ -277,7 +277,7 @@ HeapObject* PagedSpace::AllocateLinearlyAligned(int size_in_bytes,
|
|
|
|
|
| // Raw allocation.
|
| -AllocationResult PagedSpace::AllocateRaw(int size_in_bytes) {
|
| +AllocationResult PagedSpace::AllocateRawUnaligned(int size_in_bytes) {
|
| HeapObject* object = AllocateLinearly(size_in_bytes);
|
|
|
| if (object == NULL) {
|
| @@ -325,6 +325,18 @@ AllocationResult PagedSpace::AllocateRawAligned(int size_in_bytes,
|
| }
|
|
|
|
|
| +AllocationResult PagedSpace::AllocateRaw(int size_in_bytes,
|
| + AllocationAlignment alignment) {
|
| +#ifdef V8_HOST_ARCH_32_BIT
|
| + return alignment == kDoubleAligned
|
| + ? AllocateRawAligned(size_in_bytes, kDoubleAligned)
|
| + : AllocateRawUnaligned(size_in_bytes);
|
| +#else
|
| + return AllocateRawUnaligned(size_in_bytes);
|
| +#endif
|
| +}
|
| +
|
| +
|
| // -----------------------------------------------------------------------------
|
| // NewSpace
|
|
|
| @@ -368,7 +380,7 @@ AllocationResult NewSpace::AllocateRawAligned(int size_in_bytes,
|
| }
|
|
|
|
|
| -AllocationResult NewSpace::AllocateRaw(int size_in_bytes) {
|
| +AllocationResult NewSpace::AllocateRawUnaligned(int size_in_bytes) {
|
| Address old_top = allocation_info_.top();
|
|
|
| if (allocation_info_.limit() - old_top < size_in_bytes) {
|
| @@ -386,6 +398,18 @@ AllocationResult NewSpace::AllocateRaw(int size_in_bytes) {
|
| }
|
|
|
|
|
| +AllocationResult NewSpace::AllocateRaw(int size_in_bytes,
|
| + AllocationAlignment alignment) {
|
| +#ifdef V8_HOST_ARCH_32_BIT
|
| + return alignment == kDoubleAligned
|
| + ? AllocateRawAligned(size_in_bytes, kDoubleAligned)
|
| + : AllocateRawUnaligned(size_in_bytes);
|
| +#else
|
| + return AllocateRawUnaligned(size_in_bytes);
|
| +#endif
|
| +}
|
| +
|
| +
|
| LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk) {
|
| heap->incremental_marking()->SetOldSpacePageFlags(chunk);
|
| return static_cast<LargePage*>(chunk);
|
|
|