Re: [GD-General] meaning of sizeof(int) on all plateform
Brought to you by:
vexxed72
From: Bo-Staffan L. <bo-...@gb...> - 2003-06-28 20:28:46
|
> I'm not aware of any implementation where this is not the case though > the standard doesn't guarantee it. It depends on the CPU architecture. The smallest addressable unit in the C++ memory model is the byte. The number of bits in a C++ byte is implementation-specific, but to be compatible with C, it must contain atleast 8 bits. Typically, if the size of a built in type is smaller than the smallest addressable unit of the CPU, the CPU-byte, the implementation must include an offset, in conjunction with the CPU-byte address, to be able to address the C++ byte within the CPU-byte. Bo-Staffan |