Commit 3b6e3b06 authored by mrowe@apple.com's avatar mrowe@apple.com

2008-02-25 Mark Mentovai <mark@moxienet.com>

        Reviewed by Mark Rowe.

        Enable CollectorHeapIntrospector to build by itself, as well as in an AllInOneFile build.
        http://bugs.webkit.org/show_bug.cgi?id=17538

        * kjs/CollectorHeapIntrospector.cpp: Provide "using" declaration for
          WTF::RemoteMemoryReader.
        * kjs/collector.h: Move CollectorHeap declaration here...
        * kjs/collector.cpp: ... from here.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 887f359e
2008-02-25 Mark Mentovai <mark@moxienet.com>
Reviewed by Mark Rowe.
Enable CollectorHeapIntrospector to build by itself, as well as in an AllInOneFile build.
http://bugs.webkit.org/show_bug.cgi?id=17538
* kjs/CollectorHeapIntrospector.cpp: Provide "using" declaration for
WTF::RemoteMemoryReader.
* kjs/collector.h: Move CollectorHeap declaration here...
* kjs/collector.cpp: ... from here.
2008-02-25 Darin Adler <darin@apple.com>
Reviewed by Adam.
......
......@@ -32,6 +32,8 @@
#include "collector.h"
#include "MallocZoneSupport.h"
using WTF::RemoteMemoryReader;
namespace KJS {
extern "C" {
......
......@@ -84,21 +84,6 @@ const size_t GROWTH_FACTOR = 2;
const size_t LOW_WATER_FACTOR = 4;
const size_t ALLOCATIONS_PER_COLLECTION = 4000;
enum OperationInProgress { NoOperation, Allocation, Collection };
struct CollectorHeap {
CollectorBlock** blocks;
size_t numBlocks;
size_t usedBlocks;
size_t firstBlockWithPossibleSpace;
size_t numLiveObjects;
size_t numLiveObjectsAtLastCollect;
size_t extraCost;
OperationInProgress operationInProgress;
};
static CollectorHeap primaryHeap = { 0, 0, 0, 0, 0, 0, 0, NoOperation };
static CollectorHeap numberHeap = { 0, 0, 0, 0, 0, 0, 0, NoOperation };
......
......@@ -156,6 +156,21 @@ namespace KJS {
CollectorBitmap collectOnMainThreadOnly;
};
enum OperationInProgress { NoOperation, Allocation, Collection };
struct CollectorHeap {
CollectorBlock** blocks;
size_t numBlocks;
size_t usedBlocks;
size_t firstBlockWithPossibleSpace;
size_t numLiveObjects;
size_t numLiveObjectsAtLastCollect;
size_t extraCost;
OperationInProgress operationInProgress;
};
inline const CollectorBlock* Collector::cellBlock(const JSCell* cell)
{
return reinterpret_cast<const CollectorBlock*>(reinterpret_cast<uintptr_t>(cell) & BLOCK_MASK);
......
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