tpfree − Free up XATMI buffer
#include <atmi.h>
void tpfree(char *ptr);
For XATMI client link with −latmiclt −latmi −lubf −lnstd −lpthread −lrt −lm
For XATMI server link with −latmisrv|−latmisrvnomain|−latmisrvinteg −latmi −lubf −lnstd −lpthread −lrt −lm
Free up the XATMI buffer allocated by tpalloc() or tprealloc(). The pointer shall not be used to any other calls afterwards, as it points to invalid memory after call. tpfree() must not be used for auto−allocated buffers, i.e. ones received into to service routine, as auto buffers will be cleaned up in following tpreturn() or tpforward() calls.
Function will not free any other resources e.g. allocated by malloc() or calloc().
tpfree() is not needed to be called on buffers which are automatically allocated by incoming service call. Also tpfree() is not needed to called on buffers which are returned to tpreturn(3) or tpforward(3). At service ending, tpreturn or tpforward makes free auto−allocated buffer and return buffer (if it is different than auto−alloc buffer).
Function is void and no error is returned.
Function is void and no error is returned.
See atmitest/test026_typedjson/atmiclt26.c for sample code.
Report bugs to support@mavimax.com
© Mavimax, Ltd