subject
Computers and Technology, 08.03.2021 20:00 Maaarii

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
For which utilities, if any, does the landlord pay?
Answers: 2
You know the right answer?
Consider an allocator on a 32-bit system that uses an implicit free list. Each memory block, either...
Questions
question
Mathematics, 12.03.2021 21:20
question
Mathematics, 12.03.2021 21:20
question
Mathematics, 12.03.2021 21:20
question
Mathematics, 12.03.2021 21:20
Questions on the website: 13722363