Internally the compiler tracks what "niches" exist in types, like minimum and maximum valid values, and takes the unused values for enum tags.
One thing it can't use is padding in structs, because references to individual fields must remain valid, and they don't guarantee that padding will be preserved.
Also, how do I get some code to do the memory layout vizualizer, perhaps one that is a bit more advanced and knows what pointers are?