Chromium Code Reviews| Index: src/heap/spaces.cc |
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
| index 8069e51ce19b7b304926556216d53c5ea8f0818a..aa279921164d7f09b23de6043a120afc63913ed0 100644 |
| --- a/src/heap/spaces.cc |
| +++ b/src/heap/spaces.cc |
| @@ -114,7 +114,14 @@ bool CodeRange::SetUp(size_t requested) { |
| } |
| DCHECK(!kRequiresCodeRange || requested <= kMaximalCodeRangeSize); |
| +#ifdef V8_TARGET_ARCH_MIPS64 |
| + // To use pseudo-relative jumps such as j/jal instructions which have 28-bit |
| + // encoded immediate, the addresses have to be in range of 256Mb aligned |
| + // region. |
| + code_range_ = new base::VirtualMemory(requested, kMaximalCodeRangeSize); |
| +#else |
| code_range_ = new base::VirtualMemory(requested); |
| +#endif |
| CHECK(code_range_ != NULL); |
| if (!code_range_->IsReserved()) { |
| delete code_range_; |
| @@ -645,7 +652,14 @@ MemoryChunk* MemoryAllocator::AllocateChunk(intptr_t reserve_area_size, |
| base::OS::CommitPageSize()); |
| // Allocate executable memory either from code range or from the |
| // OS. |
| +#ifdef V8_TARGET_ARCH_MIPS64 |
| + // Use code range only for large object space on mips64 to keep address |
| + // range within 256-MB memory region. |
| + if (isolate_->code_range() != NULL && isolate_->code_range()->valid() && |
| + commit_size > CodePageAreaSize()) { |
|
Erik Corry
2015/06/04 10:28:15
The commit_size includes the CodePageGuardStartOff
dusmil.imgtec
2015/06/04 11:04:40
Done.
dusmil.imgtec
2015/06/04 11:04:40
Thank you for spotting this, typo mistake sorry. T
|
| +#else |
| if (isolate_->code_range() != NULL && isolate_->code_range()->valid()) { |
| +#endif |
| base = isolate_->code_range()->AllocateRawMemory(chunk_size, commit_size, |
| &chunk_size); |
| DCHECK( |