|
FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Contains a few utility method to deal with free SRAM memory. More...
Functions | |
| int | free_mem () |
| Return the amount of free SRAM memory. More... | |
| bool | check_mem (int minimum) |
| Check if current free SRAM memory is above the provided minimum. More... | |
| void | alert_mem (int minimum) |
| Check if current free SRAM memory is above the provided minimum. More... | |
Contains a few utility method to deal with free SRAM memory.
| int memory::free_mem | ( | ) |
| bool memory::check_mem | ( | int | minimum | ) |
Check if current free SRAM memory is above the provided minimum.
This can be used to ensure the program has enough memory before a big allocation (dynamic or calling a function needing a big stack).
| minimum | the minimum amount of free memory required |
| true | if free memory is strictly above minimum |
| false | if free memory is below minimum |
| void memory::alert_mem | ( | int | minimum | ) |