FTAM/9000 Programmer's Guide
170 Chapter 4
Using Support Functions
Managing Memory
Managing Memory
Use ft_didcb() and ft_dfdcb() to manage your DCB memory by allocating
and de-allocating memory for DCB structures. Refer to the “Using
FTAM” chapter for recommendations on allocating memory.
ft_didcb()
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_didcb (dcb_type, additional_size, dcb_pointer, result)
enum Ft_dcb_type dcb_type;
Uint32 additional_size;
Octet **dcb_pointer;
Api_rc *result;
Use ft_didcb() to allocate memory for Ft_xxx_in_dcb or Ft_xxx_out_dcb
structures. This function allocates the desired memory at the location
pointed to by dcb_pointer.
• When allocating memory for an inout_dcb, you may optionally use the
additional_size field to allocate more memory than the size of the
DCB structure. All fields that are pointers may need additional
memory. You must provide a large enough additional_size to contain
all returning output.
• The outcome of ft_didcb() does not return in result if you pass an
invalid result structure address on input.