Question: Determine the block sizes and header values that would result from the following sequence of malloc requests. Assumptions: (1) The allocator maintains double-word alignment and

Determine the block sizes and header values that would result from the following sequence of malloc requests. Assumptions: 

(1) The allocator maintains double-word alignment and uses an implicit free list with the block format from Figure 9.35. 

Figure 9.35

malloc returns a pointer to the beginning of the payload 31 Header Block size 3210 00 al Payload (allocated

(2) Block sizes are rounded up to the nearest multiple of 8 bytes.

Request malloc (2) malloc (9) malloc (15) malloc (20) Block size (decimal bytes) Block header (hex)

malloc returns a pointer to the beginning of the payload 31 Header Block size 3210 00 al Payload (allocated block only) Padding (optional) a = 1: Allocated a = 0: Free The block size includes the header, payload, and any padding

Step by Step Solution

3.43 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This problem touches on some core ideas such as alignment req... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Systems A Programmers Perspective Questions!