Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: OSAL_HEAP_METRICS weird values returned - need help/clarifications

$
0
0

Remember mm can merge memory in free stage and split big memory in allocation stage. so you can not judge purely by block numbers. suppose you have 20 BYTES as a free block, you allocate 10 BYTES, so one additional allocated block is there. but since you have 10 BYTES remaining in free block, free block count won't reduced one, only the free memory BYTES will reduce by 10 BYTES.

take a look at the OSAL_Memory.c, once the free memory is larger than 4 BYTES, it will be splitted out for block.

so larger number of x+y means more serious memory fragmentation.

hope it helps

Rui


Viewing all articles
Browse latest Browse all 116964

Trending Articles