Go to the source code of this file.
|
| void | PoolAllocInit (DataArray *config) |
| | Read the chunk sizes of the pools from the pool configuration.
|
| void * | PoolChunkAlloc (int bytes) |
| | Carve memory for pool nodes from the current chunk, taking a new chunk when it is too small.
|
| void * | PoolAlloc (int classSize, int reqSize, const char *name, int unused) |
| | Allocate an object from the pools.
|
| void | PoolFree (int size, void *mem) |
| | Return an object to the pools.
|
| void | PoolReport (PrnStream &stream) |
| | Print the use of the pools.
|
| void * | _PoolAlloc (int size, const char *name) |
| | Allocate from the pools, or from the current heap when the size exceeds 128 bytes.
|
| void | _PoolFree (int size, void *mem) |
| | Free memory from _PoolAlloc().
|
◆ PoolAllocInit()
Read the chunk sizes of the pools from the pool configuration.
The first chunk is big_hunk bytes and every later one small_hunk bytes.
- Parameters
-
| config | The pool configuration. |
- Ghidra address:
- 0x100117e0
◆ PoolChunkAlloc()
| void * PoolChunkAlloc |
( |
int | bytes | ) |
|
Carve memory for pool nodes from the current chunk, taking a new chunk when it is too small.
The rest of a chunk too small for the request is abandoned.
- Parameters
-
| bytes | The size in bytes, rounded down to whole words. |
- Returns
- The memory.
- Ghidra address:
- 0x10011810
◆ PoolAlloc()
| void * PoolAlloc |
( |
int | classSize, |
|
|
int | reqSize, |
|
|
const char * | name, |
|
|
int | unused ) |
Allocate an object from the pools.
- Parameters
-
| classSize | The size of the object's class in bytes. |
| reqSize | The size requested. It must equal the class size. |
| name | The object's name for the memory tracker. |
| unused | A value passed through and not read. |
- Returns
- The object.
- Ghidra address:
- 0x10011c10
◆ PoolFree()
| void PoolFree |
( |
int | size, |
|
|
void * | mem ) |
Return an object to the pools.
- Parameters
-
| size | The size it was allocated with. |
| mem | The object. |
- Ghidra address:
- 0x10011ca0
◆ PoolReport()
Print the use of the pools.
- Parameters
-
- Ghidra address:
- 0x10011d00
◆ _PoolAlloc()
| void * _PoolAlloc |
( |
int | size, |
|
|
const char * | name ) |
Allocate from the pools, or from the current heap when the size exceeds 128 bytes.
- Parameters
-
| size | The size in bytes. |
| name | The allocation's name for the memory tracker. |
- Returns
- The allocation, or null for a size of zero.
- Ghidra address:
- 0x10011d40
◆ _PoolFree()
| void _PoolFree |
( |
int | size, |
|
|
void * | mem ) |
Free memory from _PoolAlloc().
- Parameters
-
| size | The size it was allocated with. |
| mem | The allocation, or null. |
- Ghidra address:
- 0x10011d80
◆ gPoolChunkBytes