D1 Mini detecting flash size wrongly

VScode is showing me this output when I upload code onto my d1 mini.

"Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [=== ] 34.3% (used 28104 bytes from 81920 bytes)
Flash: [=== ] 25.0% (used 261479 bytes from 1044464 bytes)

However, my flash size is 4MB in size instead of the stated 1MB shown above.

This is my output with the checkflashconfig example code to prove that the d1 mini indeed does have 4MB of flash memory.

"Flash real id: 0016405E
Flash real size: 4194304 bytes

Flash ide size: 4194304 bytes
Flash ide speed: 40000000 Hz
Flash ide mode: DOUT
Flash Chip configuration ok."

I used this in my platformio.ini code:

[env:d1_mini]

platform = espressif8266

board = d1_mini

framework = arduino

Sorry if there’s anything I’m missing I just started using platform.io and am very new to this. Would appreciate any help given.

  1. Not all of the flash memory is usable for application code – some is reserved for system-specific and crucial things. See documentation.
  2. You chose how the available flash (e.g. your 4MByte) is partitioned for your application yourself, by setting the appropriate linker script. See documentation.
  3. PlatformIO correctly stores the absolute maximum flash size for the D1 Mini board as 4 Megabytes.

What does the 3MB (MAX) refer to for the 4MB flash size? Is there also a reason why the different partition configurations split the storage and leave them empty?