Misplaced Pages

Coalescing (computer science)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from Coalescence (computer science))
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Coalescing" computer science – news · newspapers · books · scholar · JSTOR (October 2023) (Learn how and when to remove this message)
This article's factual accuracy may be compromised due to out-of-date information. Please help update this article to reflect recent events or newly available information. (March 2017)
(Learn how and when to remove this message)

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 request for memory specifies a size of memory that cannot be met with an integer number of these (potentially unequally-sized) freed blocks, these neighboring blocks of freed memory cannot be allocated for this request. Coalescing alleviates this issue by setting the neighboring blocks of freed memory to be contiguous without boundaries, 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.

Coalescence and related techniques like heap compaction, can be used in garbage collection.

See also

References

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

External links


Stub icon

This computer science article is a stub. You can help Misplaced Pages by expanding it.

Categories: