| | 1 | = GetMemFree = |
| | 2 | Get the amount of free RAM memory available |
| | 3 | |
| | 4 | {{{ |
| | 5 | int GetMemFree(void); |
| | 6 | }}} |
| | 7 | |
| | 8 | == Parameters == |
| | 9 | |
| | 10 | Function does not accept any parameters. |
| | 11 | |
| | 12 | == Return Value == |
| | 13 | |
| | 14 | This function returns the number of bytes of RAM is available in the system. |
| | 15 | |
| | 16 | == Remarks == |
| | 17 | |
| | 18 | 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. |
| | 19 | |
| | 20 | == Examples == |
| | 21 | |
| | 22 | {{{ |
| | 23 | string str = StrFmt("Free memory %d", GetMemFree()); |
| | 24 | DisplayText(0, 0, str); |
| | 25 | }}} |
| | 26 | |
| | 27 | == See Also == |
| | 28 | |
| | 29 | |
| | 30 | |