Coalescing (computer science): Difference between revisions

Content deleted Content added
Addbot (talk | contribs)
m Bot: Migrating 1 interwiki links, now provided by Wikidata on d:q5137871
BattyBot (talk | contribs)
 
(17 intermediate revisions by 13 users not shown)
Line 1:
{{Multiple issues|
{{Use dmy dates|date=August 2012}}
{{more citations needed|date=October 2023}}
In [[computer science]], '''coalescing''' is the act of merging two adjacent free blocks of memory. When an application frees memory, gaps can fall in the [[memory segment]] that the application uses. Among other techniques, coalescing is used to reduce [[Fragmentation (computer)|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.
{{Update|date=March 2017 | inaccurate=yes}}
}}
{{Use dmy dates|date=AugustMarch 20122023}}
In [[computer science]], '''coalescing''' is a part of [[memory management]] in which two adjacent free blocks of [[computer memory]] are merged.
 
When a [[Computer program|program]] no longer requires certain blocks of memory, these blocks of memory can be [[Free a memory ___location|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.
Coalescence and related techniques like heap compaction, can be used in [[Garbage collection (computer science)|garbage collection]].
 
In [[computer science]], '''coalescing''' is the act of merging two adjacent free blocks of memory. When an application frees memory, gaps can fall in the [[memory segment]] that the application uses. Among other techniques, coalescing is used to reduce [[Fragmentation (computer)|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 (computer science)|garbage collection]].<ref>{{cite web |last1=Megida |first1=Dillion |title=What is the Nullish Coalescing Operator in JavaScript, and how is it useful |url=https://www.freecodecamp.org/news/what-is-the-nullish-coalescing-operator-in-javascript-and-how-is-it-useful/ |website=Freecodecamp}}</ref>
 
== See also ==
* [[Timer coalescing]]
 
==References==
Line 11 ⟶ 22:
 
[[Category:Automatic memory management]]
 
 
{{comp-sci-stub}}