I have questions regarding withinSameBlock and withinArray.
For withinSameBlock: we want to find out whether two addresses are within the same 64-byte-aligned block of memory. It says 2^6 = 64, that being 64 possible combinations of 1's and 0's for six bits: 64 possible addresses for the least significant end of a pointer's address alone. So it says we have to eliminate these last six bits and compare "the first 26 bits." It seems the addresses are assumed to be 32 bits long, 4 bytes for an int. My question is: why? What does excluding the last 6 bits give us?
For withinArray I just can't make sense of the explanation:
// ptr points to the ready-to-check element, intArray points to the first
// element of the array sign1 indicate the difference from the ready-to-check
// element to the first element sign2 indicate the difference from the last
// element to the ready-to-check element if either sign1 or sign2 is 1, the
// XOR will return 1, which indicate the two differences are difference and
// the ready-to-check is not within the array. The result should return 0,
// logic 'not' is required here. otherwise, the XOR will return 0, which
// indicate the two differences are the same and the ready-to-check is within
// the array. The result should reutrn 1, logic not is required here.