In a 32 bit machine, if you copied an int p, it would copy 4 bytes of information, which would be addressed at 0xbeefbeef, 0xbeefbef0, 0xbeefbef1, 0xbeefbef2 respectively.
Is this the same with 64 bit? Or does it store 2 bytes at a single address?
It depends on the architecture. On most "normal" 64-bit systems (e.g. arm64, x86_64, etc.) memory is "byte addressed," so each memory address refers to one byte (so it's the same as your 32-bit example).
There are systems out there which are not byte addressed, and this can included 64-bit architectures. For example, DSPs are a classic example of systems where char can be 32-bits (or more) and an individual byte (or rather, octet) is not addressable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With