How to increase memory heap size

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

cross mob
Anonymous
Not applicable

Hi,

We are using the Inventek module  ISM43362_M3G_L44 which uses the STM32F205 processor. Also we are using ThreadX/NetX_Duo/SDIO. I traced to the error "memory heap is out of size" after  the call wiced_rtos_create_thread() in our application, how can I increase the memory heap size?

Thanks in advance

0 Likes
8 Replies
Anonymous
Not applicable

All memory not allocated to static objects becomes part of the heap automatically. If your application is out of heap then you are completely out of memory.

To solve this problem you will need to profile your memory usage to determine who is allocating what and when.

WICED provides a utility called malloc_debug that will help you get that information. I believe there is a guide or blog available that outlines how to use it.

0 Likes
Anonymous
Not applicable

Hi

I can't find a guide or blog for the "malloc_debug" that outlines how to use it. Can you point them to me?

Thanks

0 Likes
Anonymous
Not applicable

malloc_debug is located at libraries/test/malloc_debug

0 Likes
Anonymous
Not applicable

Is there any example code or any document how to use it?

Thanks

0 Likes

Hi,

Sample app is in …/libraries/test/malloc_debug. Please define WICED_ENABLE_MALLOC_DEBUG to extend malloc definitions to new functions, which are defined in .../libraries/test/malloc_debug/malloc_debug.c.


Seyhan

0 Likes
Anonymous
Not applicable

While my input here doesn't help you change the heap size in the WICED SDK environment (everyone else has already done this for you), I thought I would share with you how its done in the WiConnect environment.

So I threw together another blog entry - just for you

Memory Management under WiConnect

Its even got a pretty picture:

ACKme Networks

ndutton

Anonymous
Not applicable

Hi Seyhan,

I put WICED_ENABLE_MALLOC_DEBUG:=1 to my project make file. I can build the application, but there is no malloc related messages on the PC terminal windows.


Thanks



0 Likes
Anonymous
Not applicable

Hi,

Our project was stuck in the issue. Can you invetigate this ASAP?

Thanks

0 Likes