In [[computer science]], '''coalescing''' is thea actpart of merging[[memory management]] in which two adjacent free blocks of [[computer memory]] are merged. When ana[[Computer applicationprogram|program]] freesno longer requires certain blocks of memory, gapsthese canblocks fallof inmemory thecan be [[Free a memory segment___location|freed]]. thatWithout thecoalescing, applicationthese uses.blocks Amongof memory stay separate from each other techniquesin their original requested size, coalescingeven isif usedthey are next to reduceeach [[Fragmentationother. (computer)|externalIf fragmentation]],a butsubsequent isrequest notfor totallymemory effective.specifies Coalescinga cansize of memory that cannot be donemet aswith soonan asinteger blocksnumber areof the (potentially unequally-sized) freed blocks, orthese itneighboring canblocks of freed memory cannot be deferredallocated untilfor somethis timerequest. laterCoalescing (knownalleviates asthis deferredissue coalescing)by setting the neighboring blocks of freed memory to be contiguous without boundaries, such that part or itall mightof notit can be doneallocated atfor allthe request.
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]].