Using arm-none-eabi-gcc on linux.
I am using realloc() on a M3 and find that it does not seem to free the unused blocks ?
Here is the sequence I use:uint8_t a = malloc(1000); uint8_t b = realloc(a, 100); // at this point i expect 900 bytes free in the heap. But mallinfo() shows all 1000 in use ?uint8_t c = malloc(100); // malloc asks for an extra 100 bytes at this point and total heap size becomes 1100 bytes.It appears that malloc c requests for an extra 100 bytes even though the heap should have 900 bytes remaining from the realloc. Am I doing something incorrect ?
Hi GopalR
In case you are still looking for assistance with this, I have moved your post to the Cortex-M forum. If James has given you a solution, could you please mark his response as correct?
Thanks
Oli from the Community team