Reviewers: Hannes Payer,

Message:
Hannes, could you please take a look, thanks.

Description:
Modify SizeOfFirstPage to take ool constant pool into account.

The OOL constant pool places constants in the old pointer space rather than the
code space
which makes test-heap/ReleaseOverReservedPages fail. Modify SizeOfFirstPage to increase the initial size of old-pointer space by the size of the constant pool
and
decrease the code space by a corresponding amount.

Please review this at https://codereview.chromium.org/479553002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+7, -4 lines):
  M src/heap/spaces.cc


Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 9be53e03f284018c8b8cafa6462f82712992fba4..1ed885ccf3e0d7cd1a73de51e2b1631675d0d773 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -990,10 +990,13 @@ bool PagedSpace::Expand() {


 intptr_t PagedSpace::SizeOfFirstPage() {
+ // If using an ool constant pool then transfer the constant pool allowance
+  // from the code space to the old pointer space.
+ static const int constant_pool_delta = FLAG_enable_ool_constant_pool ? 48 : 0;
   int size = 0;
   switch (identity()) {
     case OLD_POINTER_SPACE:
-      size = 112 * kPointerSize * KB;
+      size = (96 + constant_pool_delta) * kPointerSize * KB;
       break;
     case OLD_DATA_SPACE:
       size = 192 * KB;
@@ -1015,9 +1018,9 @@ intptr_t PagedSpace::SizeOfFirstPage() {
         // upgraded to handle small pages.
         size = AreaSize();
       } else {
-        size =
- RoundUp(480 * KB * FullCodeGenerator::kBootCodeSizeMultiplier / 100,
-                    kPointerSize);
+        size = RoundUp((480 - constant_pool_delta) * KB *
+ FullCodeGenerator::kBootCodeSizeMultiplier / 100,
+                       kPointerSize);
       }
       break;
     }


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to