Object-Oriented Programming · Microsoft · Medium
Requirements You have one contiguous memory pool containing n units. Design and implement these two operations: allocate(size): find and reserve one contiguous sequence of size unused units, returning a handle or offset for that region. Report failure when no sufficiently large contiguous sequence exists. free(region): return an earlier allocated region to the pool. Use the following call shapes: The interviewer will expect you to create and run your own test cases rather…
Checking your access…