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

Unified Diff: src/spaces.cc

Issue 331823002: Reland "Rename kIs64BitArch with kRequiresCodeRange." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Only assert requested <= kMaximalCodeRangeSize when the port requires code range" Created 6 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.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index 7966a04728c6291e83142eeeda1acf2039c68c77..5be2d213bfdd3a3ff8ff05aa6d84ff27823c1278 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -115,15 +115,17 @@ bool CodeRange::SetUp(size_t requested) {
ASSERT(code_range_ == NULL);
if (requested == 0) {
- // On 64-bit platform(s), we put all code objects in a 512 MB range of
- // virtual address space, so that they can call each other with near calls.
- if (kIs64BitArch) {
- requested = 512 * MB;
+ // When a target requires the code range feature, we put all code objects
+ // in a kMaximalCodeRangeSize range of virtual address space, so that
+ // they can call each other with near calls.
+ if (kRequiresCodeRange) {
+ requested = kMaximalCodeRangeSize;
} else {
return true;
}
}
+ ASSERT(!kRequiresCodeRange || requested <= kMaximalCodeRangeSize);
code_range_ = new VirtualMemory(requested);
CHECK(code_range_ != NULL);
if (!code_range_->IsReserved()) {
« no previous file with comments | « src/heap.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698