Space for bootloader?

I’m in the process of flashing a boot loader and a new firmware load so that I’ll be able to enable manual mesh bed leveling on an Ender 5.
I’m using platformio and the Auto Build Marlin plugin in MS Code, and I can’t yet find for certain how much room there is.
The Auto Build Marlin plugin calculates free space on the ATmega 1284P based on a capacity of 130048 bytes, exactly 1K short of 128K.
If Optiboot is 512 bytes and saves you 1.5K, then a “vanilla” bootloader is 2K. (it looks like extra work and risk of bricking something to go for a non-default boot loader, so I’m planning to stick with Vanilla)
So where do the numbers come from?
Is it calculating free space based upon an incorrect limit, or is the addressability limit actually 1K less than the whole address space - presumably due to memory mapped I/O or some such?