2011-02-04 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 00:20:16 +0000 (00:20 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 00:20:16 +0000 (00:20 +0000)
commitf2663494519d80c0c1b35d6732de533f1a7d98a4
tree5a69542c77daaaf442d1a8509ba4d3080eb13209
parent99501c8c21aae9574396a39ba708d71482fcf59a
2011-02-04  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Rolled back in r77612 with ASSERT/crash fixed.
        https://bugs.webkit.org/show_bug.cgi?id=53759

        Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if
        necessary. For now, the heap assumes that it always has at least one
        block live.

        * runtime/Heap.cpp:
        (JSC::Heap::Heap):
        (JSC::Heap::reset):
        * runtime/Heap.h:
        * runtime/MarkedSpace.cpp:
        (JSC::MarkedSpace::allocate):
        (JSC::MarkedSpace::shrinkBlocks):
        (JSC::MarkedSpace::sweep):
        (JSC::MarkedSpace::reset):
        * runtime/MarkedSpace.h:
        (JSC::MarkedSpace::highWaterMark):
        (JSC::MarkedSpace::setHighWaterMark):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Heap.cpp
Source/JavaScriptCore/runtime/Heap.h
Source/JavaScriptCore/runtime/MarkedSpace.cpp
Source/JavaScriptCore/runtime/MarkedSpace.h