2
3
4
5
12
13
19
20
24
25
29
30
34
35
39
40
44
45
49
50
54
55
59
60
64
65
70
71
77
78
82
83
87
88
89
93
94
95
99
100
101
105
106
107
111
112
113
117
118
119
120
124
125
126
130
131
132
138
139
143
144
static void Insert(span *pos, span *ptr)
Insert a span before in given position.
span_list()
Constructor Function.
span * PopFront()
Pop a span from front.
void PushFront(span *s)
Push a span to this list.
void Erase(span *pos) const
Erase a span form this list.
bool Empty()
Empty if Begin equals to End.
span * m_Head
list entry point.
std::mutex m_Mutex
mutex for thread safe.
virtual ~span_list()
Destructor Function.
span * Begin() const
Get begin pointer.
span * End() const
Get end pointer.
std::mutex & GetMutex()
Get mutex.
Bidirectional cyclic linked list for span.
span * m_Prev
previous span.
virtual ~span()=default
Destructor Function.
size_t m_BlockSize
page block size.
size_t m_PageId
Start page id.
void * m_FreeList
current pointer.
size_t m_UseCount
In used memory block count.
size_t m_NPages
How much page it managed.
span()
Constructor Function.
bool m_IsUse
True if in use.
Used for manage multiple page memory.