Jump to content

Coalescing (computer science)

From Wikipedia, the free encyclopedia

In computer science, coalescing is a part of memory management in which two adjacent free blocks of computer memory are merged.

When a program no longer requires certain blocks of memory, these blocks of memory can be freed. Without coalescing, these blocks of memory stay separate from each other in their original requested size, even if they are next to each other. If a subsequent memory request is larger than any individual block, these neighboring blocks of freed memory cannot be combined to satisfy it. Coalescing alleviates this issue by merging the neighboring blocks into a single contiguous block, such that part or all of it can be allocated for the request.

Among other techniques, coalescing is used to reduce external fragmentation, but is not totally effective. Coalescing can be done as soon as blocks are freed, or it can be deferred until some time later (known as deferred coalescing), or it might not be done at all.

Coalescing and related techniques like heap compaction, can be used in garbage collection.[1]

See also

[edit]

References

[edit]
  1. ↑ Megida, Dillion. "What is the Nullish Coalescing Operator in JavaScript, and how is it useful". Freecodecamp.
[edit]