Pool (memory) class.
More...
Detailed Description
Member Function Documentation
| void * mlt_pool_alloc |
( |
int |
size | ) |
|
Allocate size bytes from the pool.
- Parameters:
-
Initialise the global pool.
Purge unused items in the pool.
A form of garbage collection.
| void * mlt_pool_realloc |
( |
void * |
ptr, |
|
|
int |
size |
|
) |
| |
Allocate size bytes from the pool.
- Parameters:
-
| ptr | an opaque pointer - can be in the pool or a new block to allocate |
| size | the number of bytes |
| void mlt_pool_release |
( |
void * |
release | ) |
|
Release the allocated memory.
- Parameters:
-
| release | an opaque pointer of a block in the pool |
| static void pool_close |
( |
mlt_pool |
self | ) |
[private] |
Destroy a pool.
- Parameters:
-
| static void * pool_fetch |
( |
mlt_pool |
self | ) |
[private] |
Get an item from the pool.
- Parameters:
-
- Returns:
- an opaque pointer
| static mlt_pool pool_init |
( |
int |
size | ) |
[private] |
Create a pool.
- Parameters:
-
| size | the size of the memory blocks to hold as some power of two |
- Returns:
- a new pool object
| static void pool_return |
( |
void * |
ptr | ) |
[private] |
Return an item to the pool.
- Parameters:
-
Field Documentation
the number of blocks in the pool
lock to prevent race conditions
the size of the memory block as a power of 2
a stack of addresses to memory blocks
The documentation for this struct was generated from the following file: