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

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 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)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Systems A Programmers Perspective

ISBN: 9781292101767

3rd Global Edition

Authors: Randal E. Bryant, David R. O'Hallaron

Question Posted: