The user should request a size of memory from the system


this program is in C++

please use pointers and -> . and also please it should be a working program

Question: Write a program that simulates the "heap" using a linked list. This program should start off by taking one node of size 9096 KB. You can assume that all request to the heap are in KB.

The user should request a size of memory from the system, then the system should find memory that can be allocated based on the user's request.

If memory cannot be allocated based on user's request, send the appropriate message. Memory should be returned back to teh system after it is freed. Things to remember, you should write a user interface that has menu commands to request memory, free memory and display used memory.

Sample Memory request adn heap after request.

Heap: Node 1: Start Address: 0 Size: 9096 KB Used Memory: NULL User Request: 10 User Request: 20 User Request: 50 User Request: 10 Heap: Node 1: Start Address: 80 Size: 9006 KB Used memory: Node 1: Start Address: 0 Size 10 KB Used memory: Node 2: Start Address: 10 Size 20 KB Used memory: Node 3: Start Address: 30 Size 50 KB Used memory: Node 4: Start Address: 80 Size 10 KB Free Memory Start Address: 10 Heap Node 1: Start Address: 10 Size : 20 KB Heap Node 2: Start Address 80: Size 9006 KB Used memory: Node 1: Start Address: 0 Size 10 KB Used memory: Node 2: Start Address: 30 Size 50 KB Used memory: Node 3: Start Address: 80 Size 10 KB Free Memory Start Address: 30 Heap Node 1: Start Address: 10 Size : 70 KB Heap Node 2: Start Address 80: Size 9006 KB Used memory: Node 1: Start Address: 0 Size 10 KB Used memory: Node 2: Start Address: 80 Size 10 KB

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: The user should request a size of memory from the system
Reference No:- TGS02899795

Expected delivery within 24 Hours