Commit 0fd9fcc4 authored by ggaren@apple.com's avatar ggaren@apple.com

Build fix: start out with a 32-bit value to avoid a shortening warning.

Patch by Geoffrey Garen <ggaren@apple.com> on 2009-08-24
* runtime/Collector.cpp:
(JSC::Heap::sweep):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 37f99463
2009-08-24 Geoffrey Garen <ggaren@apple.com>
Build fix: start out with a 32-bit value to avoid a shortening warning.
* runtime/Collector.cpp:
(JSC::Heap::sweep):
2009-08-24 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
......
......@@ -1096,7 +1096,7 @@ template <HeapType heapType> size_t Heap::sweep()
if (!emptyBlocks)
return numLiveObjects;
size_t neededCells = 1.25 * (numLiveObjects + max(ALLOCATIONS_PER_COLLECTION, numLiveObjects));
size_t neededCells = 1.25f * (numLiveObjects + max(ALLOCATIONS_PER_COLLECTION, numLiveObjects));
size_t neededBlocks = (neededCells + HeapConstants<heapType>::cellsPerBlock - 1) / HeapConstants<heapType>::cellsPerBlock;
for (size_t block = 0; block < heap.usedBlocks; block++) {
if (heap.usedBlocks <= neededBlocks)
......
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