Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider an allocator that uses an implicit free list. The layout of each allocated and free memory block is as follows: Header Footer 3 1

Consider an allocator that uses an implicit free list. The layout of each allocated and free memory block is as follows:
Header
Footer
3
1
2
1
Block Size (bytes)
Block Size (bytes)
Each memory block, either allocated or free, has a size that is a multiple of eight bytes. Thus, only the 29 higher order bits in the header and footer are needed to record block size, which includes the header and footer. The usage of the remaining 3 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.
bit 2 is unused and is always set to be 0.
Given the contents of the heap shown on the next page, show the new contents of the heap (in the right table) after a call to free(0x400b010) is executed. Your answers should be given as hex values. Note that the address grows from bottom up. Assume that the allocator uses immediate coalescing, that is, adjacent free blocks are merged immediately each time a block is freed.
Give a short explanation of your answer:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago