Malloc Heap Debug: How To? (CYW943907AEVAL1F)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChMa_3922746
Level 5
Level 5
10 likes received 10 likes given 5 likes given

I am trying to figure out a way to identify and print the mallocs on the heap.  When I define WICED_ENABLE_MALLOC_DEBUG, the compiler can't find malloc_debug.h (and, neither can I). 

I've searched some threads, to no avail.

Is there any advice on how best to print what specific mallocs are on the stack?

Thanks!

0 Likes
1 Solution
KotnaniK_71
Employee
Employee
50 likes received 25 likes received 10 likes received

Hi,

You can find the malloc_debug.h file from the path in WICED:

43xxx_Wi-Fi/libraries/test/malloc_debug/malloc_debug.h

Please enable WICED_ENABLE_MALLOC_DEBUG to extend the malloc definitions to the functions defined in the malloc_debug.c file.

Thanks.

View solution in original post

0 Likes
2 Replies
KotnaniK_71
Employee
Employee
50 likes received 25 likes received 10 likes received

Hi,

You can find the malloc_debug.h file from the path in WICED:

43xxx_Wi-Fi/libraries/test/malloc_debug/malloc_debug.h

Please enable WICED_ENABLE_MALLOC_DEBUG to extend the malloc definitions to the functions defined in the malloc_debug.c file.

Thanks.

0 Likes

Excellent, thank you.  I found that I needed to include test/malloc_debug under "components" in the make file.  This did compile and is successfully dumping the info.

0 Likes