snipplets.dev/code/Arduino/freeRAM.c

6 lines
141 B
C
Raw Normal View History

2023-11-12 22:45:23 +03:00
int freeRAM() {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}