<< Previous | Next >>

pool_xappend

int pool_xappend( Pool_t * p, long base, word nel );

Description

Add another xmem 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 (where elsize is the element size of the existing pool, and nel is the parameter to this function).

The total pool size must obey the constraints documented with pool_xinit().

Parameters

p
Pool handle structure, as previously passed to pool_xinit().

base
Base address of the xmem data memory area to append to this pool. This must be nel*elsize bytes long. Typically, this would be an area allocated using xalloc().

nel
Number of elements in the memory area. 1..65534. The sum of this and the current number of elements must not exceed 65535.

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 define POOL_VERBOSE to get printf() messages.

Library

POOL.LIB

See Also

pool_xinit


Dynamic C Functions << Previous | Next >> rabbit.com