Are there any implementations that have size_t
defined as something else than unsigned int
? Under every system I worked, it was defined as unsigned int, so I'm just curious.
x86-64 and aarch64 (arm64) Linux, OS X and iOS all have size_t
ultimately defined as unsigned long
. (This is the LP64 model. This kind of thing is part of the platform's ABI which also defines things like function calling convention, etc. Other architectures may vary.) Even 32-bit x86 and ARM architectures use unsigned long
on these OSes, although long
happens to be the same representation as an int
in those cases.
I'm fairly sure it's an unsigned __int64
/unsigned long long
on Win64. (which uses the LLP64 model)
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