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

Unified Diff: src/heap/spaces.cc

Issue 1172333002: MIPS64: Fix memory allocation when code range is used for LO space only. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove ifdefs and make checks valid on mips64. Created 5 years, 6 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 | « src/heap/heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index c5f1a556f8469a9abbf676af206e2f118b6fd7be..0806b2565da68f802c9b06041efd8fe9858312dc 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -362,7 +362,8 @@ void MemoryAllocator::FreeMemory(base::VirtualMemory* reservation,
!isolate_->code_range()->contains(
static_cast<Address>(reservation->address())));
DCHECK(executable == NOT_EXECUTABLE || isolate_->code_range() == NULL ||
- !isolate_->code_range()->valid());
+ !isolate_->code_range()->valid() || size <= Page::kPageSize);
+
reservation->Release();
}
@@ -656,7 +657,7 @@ MemoryChunk* MemoryAllocator::AllocateChunk(intptr_t reserve_area_size,
// 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_area_size > CodePageAreaSize()) {
+ reserve_area_size > CodePageAreaSize()) {
#else
if (isolate_->code_range() != NULL && isolate_->code_range()->valid()) {
#endif
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698