Back to home page

Enduro/X

 
 

    


0001 TPREALLOC(3)
0002 ============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tprealloc - Reallocated previously allocated XATMI buffer
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 char *tprealloc(char *'ptr', long 'size');
0016 
0017 
0018 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0019 
0020 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0021 
0022 DESCRIPTION
0023 -----------
0024 Reallocate (change the buffer size) of previously allocated resources by *tpalloc()*. 
0025 The XATMI buffer is passed in with 'ptr' parameters and new size is provided in 
0026 'size' parameter. It is allowed to resize auto-allocated buffers 
0027 (i.e. buffer that is passed into *TPSVCINFO.data* field.)
0028 
0029 RETURN VALUE
0030 ------------
0031 In case of success, function returns possibly new pointer of re-allocated memory. 
0032 The pointer could be the same, for example if size is not changed of the buffer.
0033 In case of failure, function returns NULL and *tperrno* returns the error code.
0034 
0035 ERRORS
0036 ------
0037 Note that *tpstrerror()* returns generic error message plus custom message 
0038 with debug info from last function call.
0039 
0040 *TPEINVAL* Invalid 'ptr' pointer passed in. Either buffer not allocated by 
0041 *tpalloc()* or 'ptr' is NULL.
0042 
0043 *TPEOS* System failure occurred during serving. See logs i.e. user log, 
0044 or debugs for more info.
0045 
0046 
0047 EXAMPLE
0048 -------
0049 See *atmitest/test001_basiccall/atmiclt1.c* for sample code.
0050 
0051 BUGS
0052 ----
0053 Report bugs to support@mavimax.com
0054 
0055 SEE ALSO
0056 --------
0057 *tpalloc(3)* *tpfree(3)*
0058 
0059 COPYING
0060 -------
0061 (C) Mavimax, Ltd
0062