Boundary tag method in context of dynamic memory management, Data Structure & Algorithms

Q. How can we free the memory by using Boundary tag method in the context of Dynamic memory management?                                                                                                      

Ans.

Boundary Tag Method to free Memory is described below

To remove the arbitrary block from the free list (to combine it with the newly made free block) without traversing the whole list, the free list should be doubly linked. Thus each and every free block must contain 2 pointers, next and prev to the next and previous free block on the free block. (This is required when combining a newly freed block with a free block which immediately proceeds in the memory). Thus the front of the free block should be accessible from its rear. One way to do this is to introduce a bsize field at the given offset from the last location or address of each free block. This field exhibits the same value as the size filed at the front of the block. This field have the some value as the size field at the front of the block. The figure below shows the structure of free and allocated blocks under this method which is called the boundary tag method.

free block                                         allocated block

2446_boundary tag.png

Each of the contract fields fflag, prev, size, next, bsize next and bflag is shown as occupying a complete word, although in practice they can be packed together, several fields to a word. We assume that fflag or bflag are logically flags and that true signifies an allocated block and false indicates a free block. Using the information in the free block and the newly freed block, the system merges the two blocks into a bigger hole.

Posted Date: 7/12/2012 9:00:02 AM | Location : United States







Related Discussions:- Boundary tag method in context of dynamic memory management, Assignment Help, Ask Question on Boundary tag method in context of dynamic memory management, Get Answer, Expert's Help, Boundary tag method in context of dynamic memory management Discussions

Write discussion on Boundary tag method in context of dynamic memory management
Your posts are moderated
Related Questions
Write a detailed description of a function that takes in an integer as an argument, then prints out the squares of all positive integers whose squares are less than the input. (The

Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr

a) Find the shortest paths from r to all other nodes in the digraph G=(V,E) shown below using the Bellman-Ford algorithm (as taught in class). Please show your work, and draw the f

Chaining In this method, instead of hashing function value as location we use it as an index into an array of pointers. Every pointer access a chain that holds the element havi

Q. How can we free the memory by using Boundary tag method in the context of Dynamic memory management?

Time Complexity:- The time complexity of an algorithm is the amount of time it requires to run to completion. Some of the reasons for studying time complexity are:- We may be in

Example of pre order traversal: Reading of a book, since we do not read next chapter unless we complete all sections of previous chapter & all its sections. Figure  : Rea

Let G=(V,E) be a graph for which all nodes have degree 5 and where G is 5-edge is connected. a) Show that the vector x which is indexed by the edges E and for which xe = 1/5 for

This algorithm inputs 5 values and outputs how many input numbers were positive and how many were negative. Data to be used: N = 1, -5, 2, -8, -7

Encryption the plain-text using the round keys: 1. (Key schedule) Implement an algorithm that will take a 128 bit key and generate the round keys for the AES encryption/decryp