In contiguous memory allocation we have a problem of external fragmentation , but cant we just combine all the available small holes of free memory to create a big one according to our requirement?
Solution to external fragmentation in contiguous memory allocation
2.2k views Asked by varun At
2
There are 2 answers
0
On
Adding to varun's answer:
Compaction may not always be possible i.e. if the address binding is static the program's address space cannot be relocated. It can be done only if relocation is dynamic and is done at execution time.
One other solution is to increase the block size but it is trade off.
Yes we can combine all the memory space which is scattered all over the physical memory and is not contiguous. So we need an algorithm to move all the used memory allocations to one side of the memory so that we a contiguous free memory available. This method is called Compaction. Compaction is quite inefficient to execute and require some time. Also the memory bound dynamically can be reallocated.