Answer to Question #228828 in Python for jayanth

Question #228828
Total number of units of memory allocated/deallocated by the server?
1
Expert's answer
2021-08-24T16:42:41-0400

An algorithm to find the total number of units of memory allocated/deallocated by the server one after processing all the request is Buddy memory allocation:

  • A list contains all free nodes, which are all powers of 2 at all times.
  • When request of allocation comes, first go through with the smallest block than the bigger one.
  • If such a block is found then allocation is done, then traverse the list upwards until big enough block is found.
  • Then keep splitting the blocks-one for adding to the next free list, one to traverse down till we reach the target.
  • If no allocations found, then simply return null.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS