snipplets.dev/code/Arduino/freeRAM.c
2023-11-12 22:45:23 +03:00

6 lines
141 B
C

int freeRAM() {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}