Memory Management Glossary: B
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
backing store : Backing store (2) is typically part of a hard disk that is used by a paging or swapping system to store information not currently in main memory. Backing store is slower and cheaper than main memory.
Other [storage](/u/367f5f45f9800ccb#term-memory-1) may, less commonly, be used
in place of a hard disk (for instance, magnetic tape, floppy
disk, or historically, magnetic drum).
In general, backing store may mean any locations used to store
information when its preferred or natural location is
otherwise being used: for example, memory used by a graphical
interface to keep a copy of the contents of obscured windows.
Similar term
[swap space](/u/699ff3e2d070663d#term-swap-space).barrier(1) : A barrier is a block on reading from or writing to certain memory (2) locations by certain threads or processes.
Barriers can be implemented in either software or hardware.
Software barriers involve additional instructions around
[load](/u/34ad814de80e6063#term-load) or [store (1)](/u/699ff3e2d070663d#term-store-1) operations, which would
typically be added by a cooperative compiler. Hardware
barriers don’t require compiler support, and may be
implemented on common operating systems by using [memory
protection](/u/367f5f45f9800ccb#term-memory-protection).
Relevance to memory management
Barriers are used for [incremental](/u/7010622dc3b8d8f9#term-incremental-garbage-collection) or [concurrent](/u/5195e3271b5de55e#term-parallel-garbage-collection) [garbage collection](/u/9334865be20dfda3#term-garbage-collection).
See also
[read barrier](/u/611c5a77bde93a2f#term-read-barrier), [write barrier](/u/355fa8e73e689b3a#term-write-barrier).
Related publications
[Pirinen (1998)](/u/80406cde1a6844cf#pirinen98), [Zorn (1990)](/u/80406cde1a6844cf#zorn90).barrier(2) : A memory barrier is an instruction on certain processor architectures that will ensure certain guarantees about the order of accesses to memory.
Some processor architectures make very few guarantees about
the relative orders of [load](/u/34ad814de80e6063#term-load) and [store (1)](/u/699ff3e2d070663d#term-store-1)
operations in the instruction stream and the actual order of
accesses to [main memory](/u/367f5f45f9800ccb#term-main-memory). These architectures will
often have special instructions that make stronger guarantees.
For example, the ARM has the `DMB` (Data Memory Barrier)
instruction:
> It ensures that all explicit memory accesses that appear
> in program order before the DMB instruction are observed
> before any explicit memory accesses that appear in program
> order after the DMB instruction.
These instructions are vital for certain synchronization
operations.barrier hit : See
[protection fault](/u/5195e3271b5de55e#term-protection-fault).base pointer : A base pointer is a pointer to the base or start of an object.
This term is commonly used in opposition to [derived
pointer](/u/433f84a577790d37#term-derived-pointer).
Note that [Boehm & Chase (1992)](/u/80406cde1a6844cf#bc92a) define “base
pointer” to be “any pointer value directly recognizable by the
[collector (1)](/u/b107b7d39b75ccb0#term-collector-1)”, and this may well include
[interior pointers](/u/7010622dc3b8d8f9#term-interior-pointer).
Opposite term
[derived pointer](/u/433f84a577790d37#term-derived-pointer).
In the MPS
For objects with [in-band headers](/u/7010622dc3b8d8f9#term-in-band-header), the MPS
distinguishes between the base pointer, which points to
the start of the header, and the [client pointer](/u/b107b7d39b75ccb0#term-client-pointer),
which points to the first word after the end of the
header.best fit : The allocation policy that always allocates from the smallest suitable free block. Suitable allocation mechanisms include sequential fit searching for a perfect fit, first fit on a size-ordered free block chain, segregated fits, and indexed fits. Many good fit allocators are also described as best fit.
In theory, best fit may exhibit bad [fragmentation](/u/b18026a6b8cfa4c8#term-fragmentation), but
in practice this is not commonly observed.
See also
[allocation policy](/u/9b03e2fad7c35ce0#term-allocation-policy), [first fit](/u/b18026a6b8cfa4c8#term-first-fit), [sequential fit](/u/699ff3e2d070663d#term-sequential-fit).
Related publication
[Wilson et al. (1995)](/u/80406cde1a6844cf#wil95).*big bag of pages*.
BIBOP, or *BIg Bag Of Pages*, is a technique that encodes
[object](/u/f63e411ec871b42a#term-object) type in the high-order bits of their
[address](/u/9b03e2fad7c35ce0#term-address), by using a lookup table that maps from those
bits to a type.
Despite the name, the blocks involved need not be the size of
a [page](/u/5195e3271b5de55e#term-page).
BIBOP requires storing only objects of the same type in a
block, but this has the same advantages as [segregated
fits](/u/699ff3e2d070663d#term-segregated-fit) in general.
Historical note
This technique was invented for the PDP-10 MACLISP by JonL
White and Stavros Macrakis. It was an advance on earlier
techniques that divided the [address space](/u/9b03e2fad7c35ce0#term-address-space) into
contiguous blocks for each type.
Related publications
[Baker (1979)](/u/80406cde1a6844cf#baker79), [Steele (1977)](/u/80406cde1a6844cf#steele77).big bag of pages : See
[BIBOP](#term-BIBOP).binary buddies : The most common buddy system allocation mechanism, in which all block sizes are a power of two. Finding a block’s buddy is then a matter of flipping the appropriate bit in the block’s address.
[Internal fragmentation](/u/7010622dc3b8d8f9#term-internal-fragmentation) is usually high, because
objects are often not a good fit for power-of-two sized
blocks.
See also
[allocation mechanism](/u/9b03e2fad7c35ce0#term-allocation-mechanism), [buddy system](#term-buddy-system).
Related publication
[Wilson et al. (1995)](/u/80406cde1a6844cf#wil95).bit array : See
[bitmap](#term-bitmap).bit table : See
[bitmap](#term-bitmap).bit vector : See
[bitmap](#term-bitmap).*bit array*, *bit table*, *bit vector*, *bitset*.
A table of bits.
Relevance to memory management
Bitmaps are sometimes used to represent the marks in a
[mark-sweep](/u/367f5f45f9800ccb#term-mark-sweep) collector (see [bitmap marking](#term-bitmap-marking)),
or the used memory in a [bitmapped fits](#term-bitmapped-fit)
[allocator](/u/9b03e2fad7c35ce0#term-allocator).bitmap marking : In mark-sweep collectors, bitmap marking is a technique for marking objects that stores the mark bits for the objects in a contiguous range of memory in a separate bitmap. This improves the collector’s locality of reference and cache performance, because it avoids setting the dirty bit on the pages containing the marked objects.
Related publication
[Zorn (1989)](/u/80406cde1a6844cf#zorn89).bitmapped fit : A class of allocation mechanisms that use a bitmap to represent the usage of the heap. Each bit in the map corresponds to a part of the heap, typically a word, and is set if that part is in use. Allocation is done by searching the bitmap for a run of clear bits.
Bitmapped fit mechanisms have good [locality of
reference](/u/34ad814de80e6063#term-locality-of-reference), as they avoid examining [in-band headers](/u/7010622dc3b8d8f9#term-in-band-header)
when allocating.
See also
[allocation mechanism](/u/9b03e2fad7c35ce0#term-allocation-mechanism), [indexed fit](/u/7010622dc3b8d8f9#term-indexed-fit), [sequential fit](/u/699ff3e2d070663d#term-sequential-fit).
Related publication
[Wilson et al. (1995)](/u/80406cde1a6844cf#wil95).bitmask : A bitmap used to select or exclude a set of bits in another bitmap.
bitset : See
[bitmap](#term-bitmap).black : In a tri-color marking scheme, black objects are objects that have been scanned.
More precisely, black objects have been noted
[reachable](/u/611c5a77bde93a2f#term-reachable) and the [collector (2)](/u/b107b7d39b75ccb0#term-collector-2) has finished
with them and need not visit them again (for the purposes of
[tracing](/u/f992775ea91d0285#term-trace)).
Opposite terms
[gray](/u/9334865be20dfda3#term-gray), [white](/u/355fa8e73e689b3a#term-white).blacklisting
black-listing : A conservative garbage collector can be made more effective by blacklisting values which resemble addresses that may be allocated at in the future, but are known not to be pointers . This list is then used to avoid allocation at those addresses.
For example, such values can be gathered by scanning the
[roots](/u/611c5a77bde93a2f#term-root) before any [objects](/u/f63e411ec871b42a#term-object) have been allocated.
Related publication
[Boehm (1993)](/u/80406cde1a6844cf#boehm93).block : Block is a vague term for an (often contiguous) area of memory (1). Often used to describe memory (2) allocated by an allocator such as malloc.
In the MPS
The term *block* is used as a general term for a unit of
allocation, with *object* being reserved for
[formatted objects](/u/b18026a6b8cfa4c8#term-formatted-object).bounds error : See
[overwriting error](/u/f63e411ec871b42a#term-overwriting-error).boxed : Boxed objects are represented by a pointer to a block of memory (2) that contains the object data. Sometimes the pointer is tagged to distinguish it from an unboxed object, or to represent its type. Only the pointer is duplicated when the object is passed around, so updates to the object are reflected everywhere.
Opposite term
[unboxed](/u/ced5e8494ccaae80#term-unboxed).
See also
[BIBOP](#term-BIBOP), [tag](/u/f992775ea91d0285#term-tag).
Related publication
[Gudeman (1993)](/u/80406cde1a6844cf#gudeman93).break-table : A break-table is a data structure used by a mark-compact collector to store the relocation information.
See also
[mark-compact](/u/367f5f45f9800ccb#term-mark-compact).brk
: brk is a Unix system call that sets the limit of the data
segment. This limit is known as the break.
`brk` and its companion [sbrk](/u/699ff3e2d070663d#term-sbrk) are obsolete on Unix
systems that support [virtual memory](/u/9b6672e5a107d609#term-virtual-memory) and the `mmap`
system call.
The [C](/u/884599c4278a5039#term-c) library implementation of [malloc](/u/367f5f45f9800ccb#term-malloc)
formerly [allocated](/u/9b03e2fad7c35ce0#term-allocate) [memory (2)](/u/367f5f45f9800ccb#term-memory-2) for the
[heap](/u/5696710a733ccf6f#term-heap) by extending the data segment using `brk` or
`sbrk`. The data segment resided immediately above the
program code and [static data](/u/699ff3e2d070663d#term-static-allocation) (the
“text segment”) in the [address space](/u/9b03e2fad7c35ce0#term-address-space).

*A simplified view of the address space of a Unix process.*
More modern Unix systems use [address space layout
randomization](/u/9b03e2fad7c35ce0#term-address-space-layout-randomization) to place these segments at randomized locations
in [address space](/u/9b03e2fad7c35ce0#term-address-space), so that the [heap](/u/5696710a733ccf6f#term-heap) is no
longer adjacent to the static data.broken heart : Copying garbage collectors move reachable objects into another semi-space. They leave a forwarding pointer in the old location, pointing to the new. The object at the old location is known as a broken heart.
Similar term
[forwarding pointer](/u/b18026a6b8cfa4c8#term-forwarding-pointer).bucket : In a generational garbage collector, it is often desirable to divide generations by the age of the object. These divisions are known as buckets.
See also
[aging space](/u/9b03e2fad7c35ce0#term-aging-space), [creation space](/u/b107b7d39b75ccb0#term-creation-space), [generational garbage collection](/u/9334865be20dfda3#term-generational-garbage-collection).buddy system : Buddy systems are a subclass of strict segregated fit allocation mechanisms which make splitting and coalescing fast by pairing each block with a unique adjacent buddy block.
There is an array of [free lists](/u/b18026a6b8cfa4c8#term-free-list), one for
each allowable block size. Allocation rounds up the requested
size to an allowable size and allocates from the corresponding
free list. If the free list is empty, a larger block is
selected and split. A block may only be split into a pair of
buddies.
A block may only be coalesced with its buddy, and this is only
possible if the buddy has not been split into smaller blocks.
The advantage of buddy systems is that the buddy of a block
being freed can be quickly found by a simple address
computation. The disadvantage of buddy systems is that the
restricted set of block sizes leads to high [internal
fragmentation](/u/7010622dc3b8d8f9#term-internal-fragmentation), as does the limited ability to coalesce.
Different sorts of buddy system are distinguished by the
available block sizes and the method of splitting. They
include [binary buddies](#term-binary-buddies) (the most common),
[Fibonacci buddies](/u/b18026a6b8cfa4c8#term-fibonacci-buddies), [weighted buddies](/u/355fa8e73e689b3a#term-weighted-buddies), and
[double buddies](/u/433f84a577790d37#term-double-buddies).
See also
[allocation mechanism](/u/9b03e2fad7c35ce0#term-allocation-mechanism), [segregated fit](/u/699ff3e2d070663d#term-segregated-fit), [segregated free lists](/u/699ff3e2d070663d#term-segregated-free-list), [strict segregated fit](/u/699ff3e2d070663d#term-strict-segregated-fit).
Related publication
[Wilson et al. (1995)](/u/80406cde1a6844cf#wil95).buffer : A buffer is a large block of memory (2) from which blocks are allocated contiguously, as a simple technique for fast allocation.
By keeping only a *high-water* mark (that is, a
[pointer](/u/5195e3271b5de55e#term-pointer) to the start of unused memory), the buffer
technique avoids expensive [in-band headers](/u/7010622dc3b8d8f9#term-in-band-header) and the
searching of [free block chains](/u/b18026a6b8cfa4c8#term-free-block-chain). Buffers tend to,
however, lead to [external fragmentation](/u/43d7e4de9473d658#term-external-fragmentation).
Related publication
[Appel et al. (1988)](/u/80406cde1a6844cf#ael88).
In the MPS
Buffers are implemented using [allocation points](/u/9b03e2fad7c35ce0#term-allocation-point)
attached to [pools](/u/5195e3271b5de55e#term-pool).bus error : Strictly speaking, a bus error is a fault on a hardware bus, such as when an invalid address is issued.
Generally, any hardware exception caused by a [memory
(2)](/u/367f5f45f9800ccb#term-memory-2) access (for example, [loading](/u/34ad814de80e6063#term-load) an
[unaligned](/u/ced5e8494ccaae80#term-unaligned) [word](/u/355fa8e73e689b3a#term-word)) is termed a *bus error*. The
term is often used more loosely as a synonym for any memory
access error.
See also
[segmentation violation](/u/699ff3e2d070663d#term-segmentation-violation).byte(1) : A unit of storage measurement, equal to 8 bits.
It does not matter how the bits are arranged: a byte is just a
quantity.
This is the sense of byte used in the terms [kilobyte](/u/582bb619f9d3b4b6#term-kilobyte),
[megabyte](/u/367f5f45f9800ccb#term-megabyte), [gigabyte](/u/9334865be20dfda3#term-gigabyte), [terabyte](/u/f992775ea91d0285#term-terabyte), etc. The
prefixes in these terms derive from the SI prefixes for powers
of 1000, but since powers of two are much more common in
binary computers, they are used to denote powers of 1024 (2<sup>10</sup>).
See also
[word](/u/355fa8e73e689b3a#term-word).byte(2) : A data type defined by a processor architecture.
For example, the smallest [addressable](/u/9b03e2fad7c35ce0#term-address)
[memory location](/u/367f5f45f9800ccb#term-memory-location) on the Intel x86 family is the 8-bit
byte.
Historical note
The PDP-10 had 36-bit [words](/u/355fa8e73e689b3a#term-word), and defined “byte” to
be a general sub-[word](/u/355fa8e73e689b3a#term-word) bit-field: compare
[byte (3)](#term-byte-3). On this machine it was commonplace for
characters to be packed four or five to a word using 9- or
7-bit bytes respectively.
See also
[word](/u/355fa8e73e689b3a#term-word).byte(3) : A contiguous set of bits used to represent a range of values compactly.
The number of bits in a byte is a measure of the information
content of the byte. An *n*-bit byte can represent 2<sup>n</sup>
distinct values.
Bytes may be packed into (or otherwise stored in bit-fields
of) integers, words, or other aligned values for space
efficiency.byte(4) : A data type or storage unit defined by a programming language.
In ANSI/ISO [C](/u/884599c4278a5039#term-c), “the unit of data storage large enough
to hold the basic character set of the execution environment”.
In this sense, it is often used synonymously with the C type
`char`. C defines `sizeof(char)` to be 1. Many
architectures that run C programs equate this sense of byte
and [byte (2)](#term-byte-2).