The real question is: what are you going to do if none of sizeof(size_t) == 8 and sizeof(size_t) == 4 is true. You can also make sure that CHAR_BIT == 8 - this avoids confusion if the platform is something other than “commmon, modern hardware”, for example. Cray-1, PDP-10, mentioned elsewhere.
At some point in the future, I predict that 128-bit machines will exist, but I also think that this is far into the future, because at present we can only use 75% of the available bits in 64-bit machines for memory addresses ( size_t refers to memory addressing). Note that the top 16 bits give us 65535 times more memory than the current limit, so we have a long way to go before the memory runs out. [Do not pay attention to the current cost of assembling a machine with 256 TB of memory, which is the current limit - most systems do not even come close to what is in DISKSPACE, it does not matter RAM (a rough calculation in my head, but 42 bit is 4 TB, so 48 bits should be 32 times larger, I think)].
Mats petersson
source share