From 02d75d734f16737533654db141442c157b810071 Mon Sep 17 00:00:00 2001 From: "danno@chromium.org" Date: Mon, 25 Mar 2013 17:27:54 +0000 Subject: [PATCH] Use code_range()->exists() to determine the size of the first code page when code range is used. Review URL: https://codereview.chromium.org/12452012 Patch from Haitao Feng . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/spaces.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/spaces.cc b/src/spaces.cc index 2952fd5..f8e6a1e 100644 --- a/src/spaces.cc +++ b/src/spaces.cc @@ -1030,10 +1030,10 @@ intptr_t PagedSpace::SizeOfFirstPage() { size = 16 * kPointerSize * KB; break; case CODE_SPACE: - if (kPointerSize == 8) { - // On x64 we allocate code pages in a special way (from the reserved - // 2Byte area). That part of the code is not yet upgraded to handle - // small pages. + if (heap()->isolate()->code_range()->exists()) { + // When code range exists, code pages are allocated in a special way + // (from the reserved code range). That part of the code is not yet + // upgraded to handle small pages. size = AreaSize(); } else { size = 384 * KB; -- 2.7.4