wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/Utility/GetMemFree

Version 1 (modified by Don Wilson, 14 years ago) ( diff )

--

GetMemFree

Get the amount of free RAM memory available

int GetMemFree(void);

Parameters

Function does not accept any parameters.

Return Value

This function returns the number of bytes of RAM is available in the system.

Remarks

The function reads /proc/meminfo to obtain the result. It can be useful when testing an application to use the function to display free memory periodically and run the application for several hours/days to make sure the application is not allocating memory and never releasing it.

Examples

string str = StrFmt("Free memory %d", GetMemFree());
DisplayText(0, 0, str);

See Also

Note: See TracWiki for help on using the wiki.