blob: 9c61df6d52365d380c343d5f6785ec9c273b439b (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
//---------------------------------------------------------------------------
//
// Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved.
//
//---------------------------------------------------------------------------
// Description:
//
//
#ifndef __INC_POOL_H
#define __INC_POOL_H
//-----------------------------------------------------------------------------
// Data
//-----------------------------------------------------------------------------
typedef struct _POOL
{
const char *sig;
const char *name;
const u1Byte *start;
const u1Byte *end;
u4Byte entrySize;
RT_LIST_ENTRY freeList;
u4Byte freeCount;
u4Byte cap;
u4Byte lowMark;
u8Byte dbgComp;
u4Byte dbgLevel;
}POOL;
//-----------------------------------------------------------------------------
// Function
//-----------------------------------------------------------------------------
VOID
Pool_Init(
IN POOL *pool,
IN char *name,
IN u4Byte buflen,
IN VOID *buf,
IN u4Byte entrySize,
IN u8Byte dbgComp,
IN u4Byte dbgLevel
);
VOID *
Pool_Acquire(
IN POOL *pool
);
VOID
Pool_Release(
IN POOL *pool,
IN VOID *entry
);
VOID
Pool_Dump(
IN const POOL *pool
);
#endif // #ifndef __INC_POOL_H
|