<< Previous | Next >> | |
|
int pool_append( Pool_t * p, void * base, word nel );
Description
- Add another root memory area to an existing pool. It is assumed that the element size is the same as the element size of the existing pool.
- The data area does not have to be contiguous with the existing data area, but it must be
nel*elsize
bytes long (whereelsize
is the element size of the existing pool, andnel
is the parameter to this function).
- The total pool size must obey the constraints documented with
pool_init()
.Parameters
- p
- Pool handle structure, as previously passed to
pool_init()
.
- base
- Base address of the root data memory area to append to this pool. This must be
nel*elsize
bytes long. Typically, this would be a static (global) array.
- nel
- Number of elements in the memory area.The sum of
nel
and the current number of elements must not exceed 32767.
Return value
- Currently always zero. If you define the macro
POOL_DEBUG
, then parameters are checked. If the parameters look bad, then an exception is raised. You can definePOOL_VERBOSE
to getprintf()
messages.Library
- POOL.LIB
See Also
- pool_init
Dynamic C Functions | << Previous | Next >> | rabbit.com |