ret_freeheap

Releases all heap blocks in the free heap list to the operating system.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

int ret_freeheap()

Description

DesignVision allocates memory in blocks at least as big as specified in dv.ini/trim.ini with the heap_block_size keyword (default: 4000). When a memory block is no longer needed, for example when a list is freed, the memory blocks are placed in a free heap list. New allocations search this list first. This eliminates any potential memory fragmentation problems. If an application uses a large amount of memory, for example by loading many very large lists and then freeing them, on a system with many users, then it might be beneficial to return this unused memory to the operating system by calling ret_freeheap(). ret_freeheap() also returns the number of freed heap blocks.