long pxcalloc( Pool_t * p );
Description
- Return next available free element from the given pool. Eventually, your application should return
this element to the pool using
pxfree() to avoid memory leaks.
- The element is set to all zero bytes before returning.
Parameters
- p
- Pool handle structure, as previously passed to
pool_xinit().
Return value
-
0: No free elements are available.
-
!0: Physical (xmem address) of an element. If the pool is not linked, your application must not
write more than p->elsize bytes to it (this was the elsize parameter passed to
pool_xinit()). The application can write up to (p->elsize-8) bytes to the element
if the pool is linked. (An element has 8 bytes of overhead when the pool is linked.)
Library
- POOL.LIB
See Also
- pool_xinit, pxalloc, pxfree, phwm, pavail