GetFreeSpace

3.0

  DWORD GetFreeSpace(fuFlags)    
  UINT fuFlags; /* ignored in Windows 3.1 */

The GetFreeSpace function scans the global heap and returns the number of bytes of memory currently available.

Parameters

fuFlags

This parameter is ignored in Windows 3.1.

Return Value

The return value is the amount of available memory, in bytes, if the function is successful.

Comments

The amount of memory specified by the return value is not necessarily contiguous; the GlobalCompact function returns the number of bytes in the largest block of free global memory.

In standard mode, the value returned represents the number of bytes in the global heap that are not used and that are not reserved for code.

In 386-enhanced mode, the return value is an estimate of the amount of memory available to an application. It does not account for memory held in reserve for non-Windows applications.

See Also

GlobalCompact