The getPad() function

Returns a SPUPad object of the specified name.

Syntax

The function has the following syntax:
extern CPad* getPad(const char* strName)

Description

The function returns a SPUPad object that was created in shared memory or creates a SPUPad object in shared memory if one does not exist. The Netezza Performance Server system is responsible for cleaning up and freeing all objects that are allocated by using the pad when the current transaction ends.

The getPad() function is synonymous with the getMemPad() function, which was added to differentiate a SPUPad created in shared memory with a SPUPad that is created in local file storage memory using the getFilePad() function. The getPad() and getMemPad() functions can be used interchangeably.

In general, you should use getPad() or getMemPad() to create a SPUPad, but in some cases, there may not be enough memory for the SPUPad and the UDF could fail with out-of-memory errors. If this occurs, consider rewriting the SPUPad code to use the getFilePad() function to use a file-backed memory area instead.