Please report this to Issues · platformio/platform-ststm8 · GitHub.
There are known limitations and bugs with debug symbols in ELF files stemming from SDCC bugs at the moment (e.g. Debugging not working with Arduino examples · Issue #48 · platformio/platform-ststm8 · GitHub) so maybe that plays a part in the memory analysis here.