Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

AvailMem

Check memory available given certain requirements

Declaration

Source position: exec.pas line 1859

function AvailMem(

  requirements: Cardinal

):Cardinal;

Arguments

requirements

  

A requirements mask for the memory properties (MEMF_*)

Function result

Number of bytes free with the given properties (or biggest Memory Block)

Description

This function returns the amount of free memory given certain attributes.

To find out what the largest block of a particular type is, add MEMF_LARGEST into the requirements argument. Returning the largest block is a slow operation.

WARNING

Due to the effect of multitasking, the value returned may not actually be the amount of free memory available at that instant.

Snippet:

AvailMem(MEMF_LARGEST);
  // return size of largest available memory chunk

Documentation generated on: 2021-07-30