What is a free list?

Free list is a data structure that holds addresses for computer memory space available for use with a running program using a dynamic memory assignment. The list is essential when the program must allocate space from the area of ​​free memory called heap. Implementation of a free list can be a more connected list that needs a complex data structure, such as the most class.

When the program requires space to store information when making a program, it must require a specific amount of memory from the underlying operating system. The location of the memory blocks that can be used is stored in the free list. In order to be successful, the amount of memory available must be available in one or more of these blocks. The location is returned, this list element is removed.

After the program is performed using memory, this can de-recall. This includes handing over the indicator to the memory block back to the free list where the assignment will be available next time. 4Fragmented Ving memory area that would never be returned to the list.

A different form of memory management is called a system of assigning friends. Unlike the first fit system, allocation of friends, it maintains several free lists, each holding open blocks of only one particular size. This means that when a request for allocation is accepted, it is accepted that it is available and is returned, and the open position is returned. Requirements.

The term "List of free lists" can refer to either one connected list of memory addresses or can refer to a much more complex type of data structure. Different types of classes, if maintained simple and balanced, can help increase the speed of finding open memory blocks to the cost of sorting, but creates a programming code that is much easier to read, tune and edit.

Some programming languages ​​and operating systemWe use a special mechanism called waste collection. This is a process that can help in allocate various items on a free list and consolidate free space so that they are adjacent. This results in the prevention of fragmentation and allowing larger memory blocks to be allocated.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?