For a 2^N-byte aligned pointer, its address is always divisible by 2^N - which means that lower N bits are always zero. You can store additional information in them.
For a 2^N-byte aligned pointer, its address is always divisible by 2^N - which means that lower N bits are always zero. You can store additional information in them: encode ptr payload = ptr | payload decode_ptr data = data & ~mask decode_payload data = data & mask where mask is (1 This trick is often used to save space in low-level code (payload can be GC flags, type tag, etc. ) In effect you're not storing a pointer, but a number from which a pointer can be extracted. Of course, care should be taken to not dereference the number as a pointer without decoding.
Oh, thank you. Your answer helps a lot. – illef Jan 5 at 0:06.
16 is 0010000 in binary 32 is 0100000 in binary 64 is 1000000 in binary etc You can see that for all numbers that are multiples of 16, the last four bits are always zero. So, instead of storing these bits you can leave them out and add them back in when it's time to use the pointer.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.