C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is fragmentation? Different types of fragmentation?

0 votes
23 views
asked by sara Guru (24,570 points)

1 Answer

0 votes
Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.

External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced.Total memory space exists to satisfy a request, but it is not contiguous

Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks.Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used Reduce external fragmentation by compaction

->Shuffle memory contents to place all free memory together in one large block.

->Compaction is possible only if relocation is dynamic, and is done at execution time.
answered by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 7 views
0 votes
1 answer 38 views
38 views asked by john Guru (27,140 points)
0 votes
1 answer 31 views
31 views asked by keem Expert (13,240 points)
0 votes
1 answer 6 views
...