Consider an allocator on a 32-bit system that uses an implicit free list. Each memory block, either allocated or free, has a size that is a multiple of four bytes. Thus, only the 30 higher order bits in the header and footer are needed to record block size, which includes the header and footer and is represented in units of bytes. The usage of the remaining 2 lower order bits is as follows: bit 0 indicates the use of the current block: 1 for allocated, 0 for free. bit 1 indicates the use of the previous adjacent block: 1 for allocated, 0 for free Below is a helper routine defined to facilitate the implementation of free (void *P). Which option, if any, will complete the routine so that it performs the function properly?\
Note: "size" in the answers indicates the size of the entire block /* given a pointer to a valid block header or footer, returns the size of the block */
int size(void *hp)
{
int result;
__________;
return result;
}
1. result=(*(int *)hp)&(-7)
2. result=((*(char *)hp)&(-5))<<2
3. result=(*(int *)hp)&(-3)
4. result=(*hp)&(-7)
5. None of these