Online IDE always shows max memory usage

Online IDE shows high memory usage for bare metal and normal builds (latest mbed os added by this url https://github.com/armmbed/mbed-os).

image

#include "mbed.h"
#define WAIT_TIME 500

DigitalOut led1(PC_13);
int main()
{
    while (true)
    {
        led1 = !led1;
        wait_ms(WAIT_TIME);
    }
}

I suppose it shouldn’t use 19.5KB.

Hi,

Thanks for informing that, looking into the scatter file, you can see it defines ARM_LIB_HEAP region, which is the reason using 19KB ram.

This is a dynamic heap, so it won’t affect ram usage of application, but we will see if we can improve it.

Regards,
Desmond