9 years, 11 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

9 years, 11 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.

Accepted Answer

Thanks for your advice! I will try use stack/heap pointer.

posted by Takuya Urakawa 25 May 2014