How many bits are required to store the pointer value?

  • A+

As far as I know, the size of the pointer on 32-bit systems is usually 4 bytes, and on 64-bit systems, 8 bytes. But as far as I know not all the bits are used to store the address. If so, is it safe to use free bits for other purposes? If so, how, and how many free bits are available on 32-bit and 64-bit systems in pointer memory space?


At the time of writing the current 64 bit Intel chips use 48 bit pointers internally.

Every C++ compiler I've come across abstracts this 48 bit pointer to a 64 bit pointer with the most significant 16 bits set to zero.

But the behaviour on using any of the free bits is undefined.

Towards the end of 32 bit chips being the norm, it was possible to have 4GB of physical memory, let alone virtual memory. All 32 bits were used for a pointer.


:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: