Memory Management Functions

Working directly with memory is not typically required when developing in DataFlex. Normally, the runtime handles memory management for you. Memory management functions are only needed when calling Windows API functions directly, for example, by calling External_Functions.

 

Function

Returns

AddressOf

Returns the address of an argument.

Alloc

Allocates a block of memory.

DeRefC

Retrieves the contents of one byte of memory using its address.

DeRefDW

Retrieves the contents of one double word (four bytes) of memory using its address.

DeRefW

Retrieves the contents of one word (two bytes) of memory using its address.

Free

Frees a block of dynamically allocated memory.

MemCompare

Compares the contents of two memory blocks.

MemCopy

Copies data from one memory address to another.

MemSet

Stores a given byte value in a memory block of a given size.

ReAlloc

Changes the size of a block of memory.

StoreC

Places a one byte value in memory using its address and an offset.

StoreDW

Places a one double-word (4-byte) value in memory using its address and an offset.

StoreW

Places a one word (2-byte) value in memory using its address and an offset.