![]() |
|
| << Previous | Next >> | |
| | |
xmem long pxalloc_fast( 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.
- This is an assembler-only version of
pxalloc().
- *** Do _not_ call this function from C. ***
pxalloc_fastdoes not perform any IPSET protection, parameter validation, or update the high-water mark.pxalloc_fastis a root function. The parameter must be passed in IX, and the returned element address is in BCDE.Registers
- Parameter in IX
Trashes AF, HL
Return value in BCDE, carry flag.Example
ld ix,my_pool
lcall pxalloc_fast
jr c,.no_free
; BCDE points to elementParameters
- p
- Pool handle structure, as previously passed to
pool_init()Pass this in the IX register.
Return value
- C flag set: No free elements are available. (BCDE is undefined in this case.)
- NC flag: BCDE points to an element If the pool is not linked, your application must not write more than
p->elsizebytes to it (this was theelsizeparameter passed topool_xinit()). If the pool is linked, you can write (p->elsize-8) bytes to it. (An element has 8 bytes of overhead when the pool is linked.)Library
- POOL.LIB
See Also
- pool_init, pfree_fast, pavail_fast, pxalloc
| Dynamic C Functions | << Previous | Next >> | rabbit.com |