Commit cccce03d authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

BumpPointerAllocator assumes page size is less than MINIMUM_BUMP_POOL_SIZE

https://bugs.webkit.org/show_bug.cgi?id=80912

Patch by Myles Maxfield <mmaxfield@google.com> on 2012-04-17
Reviewed by Hajime Morita.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ce23bf69
2012-04-17 Myles Maxfield <mmaxfield@google.com>
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 <fpizlo@apple.com>
 
Attempt to fix Windows build.
......@@ -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 @@ private:
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!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment