Title: [102261] trunk/Source/_javascript_Core
Revision
102261
Author
[email protected]
Date
2011-12-07 11:52:01 -0800 (Wed, 07 Dec 2011)

Log Message

Non-Mac devices should benefit from a larger heap
https://bugs.webkit.org/show_bug.cgi?id=74015

Reviewed by Geoff Garen.
        
Removed the ENABLE(LARGE_HEAP) option from Platform.h, since it was only used in
Heap.cpp, and got in the way of having more granular, per-platform control over
what the heap size should be. Bumped the heap size to 8MB on iOS (was 512KB).

* heap/Heap.cpp:
(JSC::GCTimer::heapSizeForHint):
* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (102260 => 102261)


--- trunk/Source/_javascript_Core/ChangeLog	2011-12-07 19:45:58 UTC (rev 102260)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-12-07 19:52:01 UTC (rev 102261)
@@ -1,3 +1,18 @@
+2011-12-07  Filip Pizlo  <[email protected]>
+
+        Non-Mac devices should benefit from a larger heap
+        https://bugs.webkit.org/show_bug.cgi?id=74015
+
+        Reviewed by Geoff Garen.
+        
+        Removed the ENABLE(LARGE_HEAP) option from Platform.h, since it was only used in
+        Heap.cpp, and got in the way of having more granular, per-platform control over
+        what the heap size should be. Bumped the heap size to 8MB on iOS (was 512KB).
+
+        * heap/Heap.cpp:
+        (JSC::GCTimer::heapSizeForHint):
+        * wtf/Platform.h:
+
 2011-11-30  Simon Hausmann  <[email protected]>
 
         [Qt] V8 build fixes.

Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (102260 => 102261)


--- trunk/Source/_javascript_Core/heap/Heap.cpp	2011-12-07 19:45:58 UTC (rev 102260)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp	2011-12-07 19:52:01 UTC (rev 102261)
@@ -42,7 +42,13 @@
 
 namespace { 
 
+#if CPU(X86) || CPU(X86_64)
 static const size_t largeHeapSize = 16 * 1024 * 1024;
+#elif PLATFORM(IOS)
+static const size_t largeHeapSize = 8 * 1024 * 1024;
+#else
+static const size_t largeHeapSize = 512 * 1024;
+#endif
 static const size_t smallHeapSize = 512 * 1024;
 
 #if ENABLE(GC_LOGGING)
@@ -141,15 +147,10 @@
 
 static size_t heapSizeForHint(HeapSize heapSize)
 {
-#if ENABLE(LARGE_HEAP)
     if (heapSize == LargeHeap)
         return largeHeapSize;
     ASSERT(heapSize == SmallHeap);
     return smallHeapSize;
-#else
-    ASSERT_UNUSED(heapSize, heapSize == LargeHeap || heapSize == SmallHeap);
-    return smallHeapSize;
-#endif
 }
 
 static inline bool isValidSharedInstanceThreadState()

Modified: trunk/Source/_javascript_Core/wtf/Platform.h (102260 => 102261)


--- trunk/Source/_javascript_Core/wtf/Platform.h	2011-12-07 19:45:58 UTC (rev 102260)
+++ trunk/Source/_javascript_Core/wtf/Platform.h	2011-12-07 19:52:01 UTC (rev 102261)
@@ -1015,14 +1015,6 @@
 #endif
 #endif
 
-#ifndef ENABLE_LARGE_HEAP
-#if CPU(X86) || CPU(X86_64)
-#define ENABLE_LARGE_HEAP 1
-#else
-#define ENABLE_LARGE_HEAP 0
-#endif
-#endif
-
 #if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
 #define ENABLE_PAN_SCROLLING 1
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to