Code: Select all
int freeRam()
{
extern int __heap_start, *__brkval;
int v;
return (int)&v - (__brkval == 0 ? (int)&__heap_start : (int)__brkval);
}
ps: i'm french
thanks for help
Code: Select all
int freeRam()
{
extern int __heap_start, *__brkval;
int v;
return (int)&v - (__brkval == 0 ? (int)&__heap_start : (int)__brkval);
}
Code: Select all
chip_model ESP32
app_desc_idf_ver v4.3.1
chip_features 50
cpu_frequency 160
crystal_frequency 40
chip_revision 1
chip_cores 2
chip_features_embedded_flash 0
chip_features_wifi_bgn 1
chip_features_bluetooth_le 1
chip_features_bluetooth_classic 1
available_heap 143936
available_internal_heap 143936
minimum_heap 131028
Code: Select all
heap_caps_get_info(&info, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); // internal RAM, memory capable to store data or to create new task
info.total_free_bytes; // total currently free in all non-continues blocks
info.minimum_free_bytes; // minimum free ever
info.largest_free_block; // largest continues block to allocate big array
Users browsing this forum: No registered users and 95 guests