SysMemReallocData (FUN)

FUNCTION SysMemReallocData : POINTER TO BYTE

Reallocate data memory with the specified size. By use of this function the size of a memory block can be modified (reallocation). Therefor a pointer on the memory block to be reallocated is passed to the function. The content of the memory block will not be modified. If the requested memory size cannot made available at the same place (address) , the function will allocate new memory space, RETURN: Pointer to the memory block. 0 if no memory is not available

InOut:

Scope

Name

Type

Comment

Return

SysMemReallocData

POINTER TO BYTE

Input

szComponent

STRING

Name of the component. Can be the library- or POU-name from IEC.

pMemory

POINTER TO BYTE

Pointer to memory to resize

udiSize

__XWORD

Requested size of the memory

pResult

POINTER TO RTS_IEC_RESULT

Pointer to runtime system error code (see CmpErrors_Itfs.library)