EHS
GC.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Vector.h
"
4
#include "
BaseObj.h
"
5
#include "
ehs/system/Mutex.h
"
6
#include "
ehs/system/Thread.h
"
7
8
namespace
ehs
9
{
10
typedef
bool (*
GcLogic
)(
BaseObj
*);
11
12
class
EHS_LIB_IO
GC
13
{
14
private
:
15
static
Array<GcLogic>
logic;
16
static
Vector<BaseObj*>
garbage;
17
static
UInt_64 max;
18
static
Thread
thread;
19
static
Mutex
mutex;
20
static
bool
running;
21
22
static
bool
Has(
const
BaseObj
* obj);
23
24
public
:
25
static
void
Start();
26
27
static
void
Stop();
28
29
static
bool
HasLogic(
GcLogic
logicCb);
30
31
static
bool
AddLogic(
GcLogic
logicCb);
32
35
static
void
Add(
BaseObj
* obj);
36
39
static
void
SetMax(UInt_64 newMax);
40
43
static
UInt_64 GetMax();
44
47
static
void
SetStride(UInt_64 newStride);
48
51
static
UInt_64 GetStride();
52
55
static
UInt_64 Size();
56
58
static
void
Poll();
59
62
static
void
Dump();
63
64
static
bool
IsRunning();
65
66
private
:
67
static
bool
ShouldDelete(
BaseObj
*obj);
68
};
69
}
BaseObj.h
Mutex.h
Thread.h
Vector.h
ehs::Array< GcLogic >
ehs::BaseObj
Definition:
BaseObj.h:9
ehs::GC
Definition:
GC.h:13
ehs::Mutex
Definition:
Mutex_PT.h:11
ehs::Thread
Definition:
Thread.h:24
ehs::Vector
Definition:
Vector.h:18
ehs
Definition:
Anchor.h:6
ehs::GcLogic
bool(* GcLogic)(BaseObj *)
Definition:
GC.h:10
include
ehs
GC.h
Generated by
1.9.4