Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program description: it has to be first fit algorithm Sample program to test our functions Write a collection of C functions that provide the functionality

Program description: it has to be first fit algorithm image text in transcribed
Sample program to test our functions
image text in transcribed
image text in transcribed
Write a collection of C functions that provide the functionality of a heap manager These are the functions that you should provide: void heap_init(int num pages for heap) void heap_alloc(int num bytes to allocate) void heap_free(void "pointer to area to free) I will write a set of test programs which invoke your functions. The program must manage the space in a set of pages which you obtain via the mmap system call. It should use the first-fit algorithm to allocate new space The program must align requests on 16-byte addresses The program will need to maintain data structures that minimally keep track of blocks of free space. These data structures should NOT be in the allocated pages themselves If the user frees two blocks of memory that are adjacent, your program should coalesce them. If the user attempts to allocate more space than is available in an open free block, then heap alloc should return NULL

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions