trying to monitor memory heap and stack

Hello,

My App crash after several hours, I want to be sure It does not come from a memory problem..

I took the following code from the web:

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

but __heap_start and __brkva are not defined within Industruino environment.

please tell me how to monitor memory on my industruino

thanks

Arnaud

 

Arnaud Lismonde
Arnaud Lismonde
24
| 1 1 1
Asked on 7/6/20, 12:27 PM
0
vote
1184 Views

Hi, this library also works for Industruino https://github.com/mpflaga/Arduino-MemoryFree (as it supports SAMD)

Tom
Tom
5675
| 1 1 3
Answered on 7/7/20, 1:05 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

62 follower(s)

Stats

Asked: 7/6/20, 12:27 PM
Seen: 1184 times
Last updated: 7/7/20, 1:05 AM