Configuring MALLOC Space in Murata Type1LD

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

cross mob
Starlord
Level 1
Level 1
10 sign-ins 5 replies posted 5 questions asked

Hi,

We uses Murata Type1LD and recently found an issue with 'malloc'. 'malloc' fails to allocate space even though heap has plenty of space. We checked heap status and it shows as below,

sbrk heap size: 206916
sbrk current free: 163832
malloc arena: 43084
malloc allocated: 42300
malloc free: 784

It seems like malloc does not uses all the available heap space (163KB free). We would like to know whether there is any way to configure Wiced (via ld file or any other method) to use all available heap space in malloc. It seems like Wiced uses FreeRTOS 'heap_3' implementation. Any help on this is highly appreciated

regards

SR

0 Likes
2 Replies
Rakesh_BG
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 100 sign-ins

Hi @Starlord ,

configTOTAL_HEAP_SIZE can be used to configure the heap size which can be used.

Can you tell us what are the configuration changes you have done in Freertos over the default one.

Thanks,

Rakesh B G

0 Likes
Starlord
Level 1
Level 1
10 sign-ins 5 replies posted 5 questions asked

Hi @Rakesh_BG ,

configTOTAL_HEAP_SIZE  i snot applicable with Heap 3 mode. We havent made any changes in Wiced default FreeRTOS configuration. As you could see, malloc fails to use available heap space. So we were wondering how we can change it so that malloc can make use of all available heap space

regards

SR

0 Likes