Title: [114477] trunk/Source
Revision
114477
Author
[email protected]
Date
2012-04-17 20:42:43 -0700 (Tue, 17 Apr 2012)

Log Message

BumpPointerAllocator assumes page size is less than MINIMUM_BUMP_POOL_SIZE
https://bugs.webkit.org/show_bug.cgi?id=80912

Patch by Myles Maxfield <[email protected]> on 2012-04-17
Reviewed by Hajime Morita.

* wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::create):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (114476 => 114477)


--- trunk/Source/_javascript_Core/ChangeLog	2012-04-18 03:34:06 UTC (rev 114476)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-04-18 03:42:43 UTC (rev 114477)
@@ -1,3 +1,13 @@
+2012-04-17  Myles Maxfield  <[email protected]>
+
+        BumpPointerAllocator assumes page size is less than MINIMUM_BUMP_POOL_SIZE
+        https://bugs.webkit.org/show_bug.cgi?id=80912
+
+        Reviewed by Hajime Morita.
+
+        * wtf/BumpPointerAllocator.h:
+        (WTF::BumpPointerPool::create):
+
 2012-04-17  Filip Pizlo  <[email protected]>
 
         Attempt to fix Windows build.

Modified: trunk/Source/WTF/wtf/BumpPointerAllocator.h (114476 => 114477)


--- trunk/Source/WTF/wtf/BumpPointerAllocator.h	2012-04-18 03:34:06 UTC (rev 114476)
+++ trunk/Source/WTF/wtf/BumpPointerAllocator.h	2012-04-18 03:42:43 UTC (rev 114477)
@@ -26,7 +26,9 @@
 #ifndef BumpPointerAllocator_h
 #define BumpPointerAllocator_h
 
+#include <algorithm>
 #include <wtf/PageAllocation.h>
+#include <wtf/PageBlock.h>
 
 namespace WTF {
 
@@ -110,7 +112,7 @@
         if (minimumCapacity < sizeof(BumpPointerPool))
             return 0;
 
-        size_t poolSize = MINIMUM_BUMP_POOL_SIZE;
+        size_t poolSize = std::max(static_cast<size_t>(MINIMUM_BUMP_POOL_SIZE), WTF::pageSize());
         while (poolSize < minimumCapacity) {
             poolSize <<= 1;
             // The following if check relies on MINIMUM_BUMP_POOL_SIZE being a power of 2!
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to