Write a program to simulate a dynamic memory subsystem. The program should have function(s) which accept(s) input in the form of pid, allocate, size in bytes, pid, free, address, and pid, resize, address, new size. *** If the requests are valid and adequate space is available, 1) and 3) should return the address of the space granted; otherwise, they should return 0. *** request of the form 2) should return 0 for valid requests and -1 for invalid ones. Create a test trace for at least 5 processes (5 unique pids). Clearly comment your code
Get Free Quote!
420 Experts Online