Computers and Technology
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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:30, caldonjoshhsms2061
What are the steps involved in accepting all the changes in a document? arrange these in order click edit. click accept or reject. click changes. click accept all.
Answers: 1
image
Computers and Technology, 23.06.2019 04:10, cvbnkifdfg
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
image
Computers and Technology, 25.06.2019 04:30, richtercatrina16
He 98 pointsss how has computers changed over the years? how can they be used now? give details and such!
Answers: 1
image
Computers and Technology, 25.06.2019 05:00, tshegofatso92
7. the cullerton park district holds a mini-olympics each summer. create a class named participant with fields for a name, age, and street address. include a constructor that assigns parameter values to each field and a tostring() method that returns a string containing all the values. also include an equals() method that determines two participants are equal if they have the same values in all three fields. create an application with two arrays of at least eight participants each—one holds participants in the mini-marathon, and the other holds participants in the diving competition. prompt the user for participant values. after the data values are entered, display values for participants who are in both events. save the files as participant. java and twoeventparticipants. java.
Answers: 2
Do you know the correct answer?
Consider an allocator on a 32-bit system that uses an implicit free list. Each memory block, either...

Questions in other subjects:

Konu
Mathematics, 16.12.2020 22:00