Lably
Skip to content

Fragmentation (computing)

Inefficient use of storage space

  • 13 min read
  • 4 chapters

Related on Lably

Through Computer memory, Heuristic and Defragmentation

Basic principle

In main memory fragmentation, when a computer program requests blocks of memory from the computer system, the blocks are allocated in chunks. When the computer program is finished with a chunk, it can free it back to the system, making it available to later be allocated again to another or the same program. The size and the amount of time a chunk is held by a program vary. During its lifespan, a computer program can request and free many chunks of memory.

Fragmentation can occur when a block of memory is requested by a program and is allocated to that program, but the program has not freed (uncommitted) it. This leads to theoretically "available", unused memory being marked as allocated - which reduces the amount of globally available memory, making it harder for programs to request and access memory.

When a program is started, the free memory areas are long and contiguous. Over time and with use, the long contiguous regions become fragmented into smaller and smaller contiguous areas. Eventually, it may become impossible for the program to obtain large contiguous chunks of memory.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication