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 GitHub - ARMmbed/mbed-os: Arm Mbed OS is a platform operating system designed for the internet of things).

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