The getMemPad() function
Returns a SPUPad object of the specified name.
Syntax
extern CPad* getMemPad(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 it does not already 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 getMemPad() function is identical in behavior to the getPad() function. The getMemPad() function creates and accesses a SPUPad in shared memory, while the getFilePad() function creates and accesses a SPUPad created in a file-backed area. The getPad() and getMemPad() functions can be used interchangeably.
In general, you should use 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.