# Heap user defined functions Reference

Below is a complete list of the user defined functions available in AutoIt. Click on a user defined function name for a detailed description.

When using them you need to add a #include <WinAPIMem.au3>.

User Defined Function | Description
--- | ---
_WinAPI_CreateBuffer | Allocates a block of memory from the internal library heap
_WinAPI_CreateBufferFromStruct | Allocates a block of memory from the internal library heap and initializes it with the structure's data
_WinAPI_CreateString | Copies a specified string to the newly allocated memory block and returns its pointer
_WinAPI_EqualMemory | Compares two blocks of memory to determine whether the specified number of bytes are identical
_WinAPI_FillMemory | Fills a block of memory with the given value
_WinAPI_FreeMemory | Frees a memory block in the internal library heap
_WinAPI_GetMemorySize | Retrieves the size of a memory block allocated from the internal library heap
_WinAPI_GlobalMemoryStatus | Retrieves information about current available memory
_WinAPI_IsBadCodePtr | Determines whether the calling process has read access to the memory at the specified address
_WinAPI_IsBadReadPtr | Verifies that the calling process has read access to the specified range of memory
_WinAPI_IsBadStringPtr | Verifies that the calling process has read access to the specified range of memory
_WinAPI_IsBadWritePtr | Verifies that the calling process has write access to the specified range of memory
_WinAPI_IsMemory | Determines whether the specified pointer points to the memory block in the internal library heap
_WinAPI_LocalFree | Frees the specified local memory object and invalidates its handle
_WinAPI_MoveMemory | Moves a block of memory from one location to another
_WinAPI_ReadProcessMemory | Reads memory in a specified process
_WinAPI_WriteProcessMemory | Writes memory in a specified process
_WinAPI_ZeroMemory | Fills a block of memory with zeros