{{page>en:templates:win16api}} ====== LocalCompact ====== ==== Brief ==== Compacts the local heap to satisfy a memory request and returns the size of the largest free block. ==== Syntax ==== UINT WINAPI LocalCompact( UINT uMinFree ); ==== Parameters ==== uMinFree – Minimum amount of free space (in bytes) desired. Can be zero. ==== Return Value ==== Returns the maximum size of a free block that can be allocated after compaction. ==== Notes ==== Compaction may move unlocked discardable blocks or discard them entirely. This function is rarely needed because Windows automatically manages the heap. ==== Example Code ==== ==== C Binding ==== UINT maxFree = LocalCompact(1024); ==== MASM Binding ==== push 1024 call LocalCompact ==== See also ==== * [[LocalAlloc]] * [[LocalDiscard]] {{page>en:templates:win16}}