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

Assignment Help:

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.


Related Discussions:- Boundary tag method in context of dynamic memory management

Stack, using a program flowchart design a program to illustrate pop and pus...

using a program flowchart design a program to illustrate pop and push operation

Steps of pre-order traversal, Pre-order Traversal The method of doing a...

Pre-order Traversal The method of doing a pre-order traversal iteratively then has the several steps(suppose that a stack is available to hold pointers to the appropriate nodes

Infix notation to postfix notation, Which data structure is required to cha...

Which data structure is required to change infix notation to postfix notation?    Stack function is used to change infix notation to postfix notatio n

Determine the components of illumination, Determine the Components of Illum...

Determine the Components of Illumination The light reaching the eye when looking at a surface has clearly come from a source (or sources) of illumination and bounced off the su

Limitation of binary search, Limitation of Binary Search: - (i)  The co...

Limitation of Binary Search: - (i)  The complexity of Binary search is O (log2 n). The complexity is similar irrespective of the position of the element, even if it is not pres

Define prims algorithm, Define Prim's Algorithm Prim's  algorithm  is  ...

Define Prim's Algorithm Prim's  algorithm  is  a  greedy  algorithm  for  constructing  a  minimum  spanning  tree  of  a  weighted linked graph. It works by attaching to a bef

Programs, Develop a program that accepts the car registration( hint: LEA 43...

Develop a program that accepts the car registration( hint: LEA 43242010)

What are the dynamic arrays, What are the Dynamic arrays Dynamic arrays...

What are the Dynamic arrays Dynamic arrays are convenient for programmers since they can never be too small-whenever more space is needed in a dynamic array, it can simply be e

Queue, 1. Show the effect of each of the following operations on queue q. A...

1. Show the effect of each of the following operations on queue q. Assume that y (type Character) contains the character ‘&’. What are the final values of x and success (type boole

Write an algorithm to input number of passengers travelling, There are ten ...

There are ten stations on a railway line: Train travels in both directions (i.e. from 1 to 10 and then from 10 to 1).  Fare between each station is $2. A passenger input

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd