wavelength
1.0.0
Loading...
Searching...
No Matches
Pool.h
Go to the documentation of this file.
1
#pragma once
2
10
class
Pool
{
11
public
:
12
Pool
() : mElems(0), mFree(0), mSize(0), mNum(0) {
13
}
14
21
void
*
Alloc
();
22
29
void
Free
(
void
*elem);
30
31
private
:
33
struct
FreeElem {
34
FreeElem *mNext;
35
};
36
37
char
*mElems;
38
FreeElem *mFree;
39
int
mSize;
40
int
mNum;
41
};
Pool::Alloc
void * Alloc()
Take an element.
Pool::Free
void Free(void *elem)
Return an element, which must lie in the pool's block.
Pool::Pool
Pool()
Definition
Pool.h:12
tools
synthedit
utl
common
Pool.h
Generated by
1.15.0