I assume you’re joking, but if not: the 4MB of flash you see is not mapped 1:1 with 4MB of actual flash on the SD card. Instead there might be something like 5MB, but your OS only sees 4MB of that.
The extra unallocated space is used as spare sectors (sectors degrade and must be swapped out) or even just randomly if it somehow increases IO performance (depending on the firmware).
Erasing the 4MB visible to your OS will not erase everything, there still may be whole files or fragments of your files sitting in the extra space. Drive-vendor specific commands can reliably access this space (if they exist and are available to you, which they mostly are not). Some secure erase commands may wipe the unallocated space but that’s vendor specific, not documented and I don’t think even supported over the SD interface (although I might be wrong on this last point).
Encryption and physical destruction are your best bets.
The file size discrepancy is usually due to 1000 vs 1024
No, that’s something else entirely.
but filling the drive with random data until its full should wipe the drive.
Only if you assume people can’t access the reserved/unallocated/over-provisioned sectors. If you are only worried about small thieves then this might not be an issue. If you’re handling sensitive data (like medical records for other people or anything with sensitive passwords) then it’s completely inadequate to leave any form of data anywhere on the disk.
I assume you’re joking, but if not: the 4MB of flash you see is not mapped 1:1 with 4MB of actual flash on the SD card. Instead there might be something like 5MB, but your OS only sees 4MB of that.
The extra unallocated space is used as spare sectors (sectors degrade and must be swapped out) or even just randomly if it somehow increases IO performance (depending on the firmware).
Erasing the 4MB visible to your OS will not erase everything, there still may be whole files or fragments of your files sitting in the extra space. Drive-vendor specific commands can reliably access this space (if they exist and are available to you, which they mostly are not). Some secure erase commands may wipe the unallocated space but that’s vendor specific, not documented and I don’t think even supported over the SD interface (although I might be wrong on this last point).
Encryption and physical destruction are your best bets.
Link to source? The file size discrepancy is usually due to 1000 vs 1024, but filling the drive with random data until its full should wipe the drive.
Look up “SSD over-provisioning”
No, that’s something else entirely.
Only if you assume people can’t access the reserved/unallocated/over-provisioned sectors. If you are only worried about small thieves then this might not be an issue. If you’re handling sensitive data (like medical records for other people or anything with sensitive passwords) then it’s completely inadequate to leave any form of data anywhere on the disk.