blob: 80d674ca9b20e1b1319a5347ada9075b624ce65b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#ifndef IncrementalSweeper_h
#define IncrementalSweeper_h
#include "HeapTimer.h"
#include "MarkedBlock.h"
#include <wtf/HashSet.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
namespace JSC {
class Heap;
class IncrementalSweeper : public HeapTimer {
public:
static PassOwnPtr<IncrementalSweeper> create(Heap*);
void startSweeping(const HashSet<MarkedBlock*>& blockSnapshot);
virtual void doWork();
private:
#if USE(CF)
IncrementalSweeper(Heap*, CFRunLoopRef);
void doSweep(double startTime);
void scheduleTimer();
void cancelTimer();
unsigned m_currentBlockToSweepIndex;
double m_lengthOfLastSweepIncrement;
Vector<MarkedBlock*> m_blocksToSweep;
#else
IncrementalSweeper(JSGlobalData*);
#endif
};
} // namespace JSC
#endif
|