Coalescing (computer Science)
   HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, coalescing is a part of
memory management Memory management (also dynamic memory management, dynamic storage allocation, or dynamic memory allocation) is a form of Resource management (computing), resource management applied to computer memory. The essential requirement of memory manag ...
in which two adjacent free blocks of
computer memory Computer memory stores information, such as data and programs, for immediate use in the computer. The term ''memory'' is often synonymous with the terms ''RAM,'' ''main memory,'' or ''primary storage.'' Archaic synonyms for main memory include ...
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 External may refer to: * Externality In economics, an externality is an Indirect costs, indirect cost (external cost) or indirect benefit (external benefit) to an uninvolved third party that arises as an effect of another party's (or parties') ...
, 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 Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclable ...
.


See also

* Timer coalescing


References


External links


The Memory Management Reference, Beginner's Guide Allocation
Automatic memory management {{comp-sci-stub