Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 7 months ago.
heapstats() cause Compile error on LPC1114FN28
Hi.
I want to see the state of allocation heap on LPC1114FN28. So I used heapstats(). But I get compile error :
Error: Undefined symbol __heapstats (referred from main.cpp.LPC1114.o).
Why cant I use this function?
The code which I tried is here. https://mbed.org/forum/mbed/topic/2702/?page=1#comment-13879
Thanks.
on LPC1768, this code works fine!
1 Answer
10 years, 7 months ago.
I don't think heapstats exist for uARM lib. Regular ARM lib does have it, but would take way more space on a relative small device like the LPC1114.
Tbh you can get quite far by allocating a memory block and comparing the returned pointer with the stackpointer/static allocated variable.