Bug 717863 default pagesize is 8192 on Solaris/SPARC r=igor
authorGinn Chen <ginn.chen@oracle.com>
Mon, 16 Jan 2012 09:32:58 +0800
changeset 85794 a3bdb21f350c2f69fe0c67d9849417cc12081a7e
parent 85793 720f1f3c2c0f681fa42f0be907c2cefb4fc407dd
child 85795 f64609a2123591ff07d78ad5fab542293e9acce0
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersigor
bugs717863
milestone12.0a1
Bug 717863 default pagesize is 8192 on Solaris/SPARC r=igor
js/src/jsgc.h
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -86,17 +86,25 @@ namespace gc {
 struct Arena;
 
 /*
  * This must be an upper bound, but we do not need the least upper bound, so
  * we just exclude non-background objects.
  */
 const size_t MAX_BACKGROUND_FINALIZE_KINDS = FINALIZE_LIMIT - FINALIZE_OBJECT_LIMIT / 2;
 
+/*
+ * Default pagesize is 8192 on Solaris SPARC.
+ * Do not use JS_CPU_SPARC here, this header is used outside JS.
+ */ 
+#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
+const size_t ArenaShift = 13;
+#else
 const size_t ArenaShift = 12;
+#endif
 const size_t ArenaSize = size_t(1) << ArenaShift;
 const size_t ArenaMask = ArenaSize - 1;
 
 /*
  * This is the maximum number of arenas we allow in the FreeCommitted state
  * before we trigger a GC_SHRINK to release free arenas to the OS.
  */
 const static uint32_t FreeCommittedArenasThreshold = (32 << 20) / ArenaSize;