16.10 - Allocate Storage - Parallel Transporter

Teradata Parallel Transporter Operator Programmer Guide

Parallel Transporter
May 2017
Programming Reference


Allocate Storage is the service function that allocates Teradata PT storage for the operator.


#include <pxoper.h>
PXSTC_Code PX_AllocateStorage(PX_OperatorHandle  operator,
   PX_Length  storageSize,
   PX_Addr *  storageAddr);

where the following is true:

Parameter Function Specification
operator input Instance of the operator for which the storage is to be allocated.
storageSize input Amount of storage you want to allocate to the named operator.
storageAddr output Pointer to the address of the allocated storage.

Return Codes

The following Allocate Storage function status codes are defined by the Teradata PT operator interface.

Status Code Signifies
PXSTC_InvalidArgument One or more bad input arguments.
PXSTC_BadHandle An undefined object handle.
PXSTC_NotEnough Either:
  • Not enough storage can be allocated
  • The requested storage size is too large
PXSTC_Success Successful access to the object attribute.

Usage Notes

Consider the following when using the Allocate Storage function.

Topic Usage Note
Status If the function status is PXSTC_Success, the storage address will be stored in the location indicated by the storageAddr parameter. See also the Free Storage function.