Memory Management Glossary: V
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
code
*immutable object*.
A *value object* or *immutable object* is an [object](/u/f63e411ec871b42a#term-object)
whose identity depends solely upon its value or magnitude.
In a typed language, the compiler can often determine at
compile time that certain types can be represented as value
objects. Usually these types are a [scalar data type](/u/699ff3e2d070663d#term-scalar-data-type)
with bounded magnitude.
Relevance to memory management
If value objects can be identified, the compiler and the
memory manager can make certain optimizations: Value
objects can be represented as [immediate data](/u/7010622dc3b8d8f9#term-immediate-data) to
minimize storage overhead, they can be replicated to
improve [locality](/u/34ad814de80e6063#term-locality-of-reference), and a
[vector data type](#term-vector-data-type) of value objects can be
represented as a [leaf object](/u/34ad814de80e6063#term-leaf-object).
Historical note
Some programming languages expose representational details
such as the use of value objects. In [Lisp](/u/884599c4278a5039#term-lisp), for
example, numbers are often represented as value objects
but not always as immediate data. The `EQ` predicate of
Lisp tests if two objects have the same representation,
whereas the `EQL` predicate tests if two objects
represent the same type and value (are computationally
identical). Because the choice of representation is an
optimization, exposing it at the language level can
cause programs to behave differently under different
compilers or optimization settings. Modern languages, such
as [Dylan](/u/884599c4278a5039#term-dylan) hide this representational distinction,
permitting the compiler greater freedom in optimization.
Similar term
[immediate data](/u/7010622dc3b8d8f9#term-immediate-data).
See also
[immutable](/u/7010622dc3b8d8f9#term-immutable).
Related publication
[Baker (1993a)](/u/80406cde1a6844cf#baker93a).variety : In the MPS
code
A behaviour of the MPS that must be selected at
compilation time. There are three varieties: [cool](/u/b107b7d39b75ccb0#term-cool),
[hot](/u/5696710a733ccf6f#term-hot) and [rash](/u/611c5a77bde93a2f#term-rash). See
[Varieties](https://www.ravenbrook.com/project/mps/master/manual/html/topic/error.html#topic-error-variety).vector data type : A vector data type is an aggregate type whose elements belong to the same type and are indexed by integers or tuples of integers.
code
Examples of vector data types include strings and arrays.
Relevance to memory management
Vector data types are seldom represented using
[value objects](#term-value-object), but may be
represented using [leaf objects](/u/34ad814de80e6063#term-leaf-object) if
they are an aggregate of a type that can be represented by
[value objects](#term-value-object). [Scanning](/u/699ff3e2d070663d#term-scan) information for vectors can be compactly encoded
in terms of the aggregated type and the vector size.
See also
[algebraic data type](/u/9b03e2fad7c35ce0#term-algebraic-data-type), [scalar data type](/u/699ff3e2d070663d#term-scalar-data-type), [leaf object](/u/34ad814de80e6063#term-leaf-object), [value object](#term-value-object).virtual address : Also known as
code
*logical address*.
In a [virtual memory](#term-virtual-memory) system, the [addresses](/u/9b03e2fad7c35ce0#term-address) that
application programs deal with are known as *virtual
addresses*.
The virtual addresses used by the application program are
translated by the virtual memory system (often using
[translation lookaside buffers](/u/f992775ea91d0285#term-translation-lookaside-buffer) and [page tables](/u/5195e3271b5de55e#term-page-table))
to [physical addresses](/u/5195e3271b5de55e#term-physical-address). It is the physical address that
is used to retrieve the contents from the [memory (3)](/u/367f5f45f9800ccb#term-memory-3).
Opposite term
[physical address](/u/5195e3271b5de55e#term-physical-address).virtual address space : The virtual address space is the space of virtual addresses.
code
On [virtual memory](#term-virtual-memory) systems, user processes see the
virtual address space, and commonly have a separate virtual
address space each, so that they map the same addresses to
different data. These systems often have [shared memory](/u/699ff3e2d070663d#term-shared-memory)
as well.
Opposite term
[physical address space](/u/5195e3271b5de55e#term-physical-address-space).virtual memory : Also known as
code
*VM*.
In a *virtual memory* (*VM*) system, the program code deals
with [virtual addresses](#term-virtual-address). Upon use,
the virtual address is translated by the [MMU](/u/367f5f45f9800ccb#term-mmu) to obtain
a [physical address](/u/5195e3271b5de55e#term-physical-address) that is used to access
[physical memory (1)](/u/5195e3271b5de55e#term-physical-memory-1).
Some operating systems can simulate having more [memory
(2)](/u/367f5f45f9800ccb#term-memory-2) than is available as [main memory](/u/367f5f45f9800ccb#term-main-memory), by storing part
of the data in [backing store](/u/4c6aaf4e0e0b7eb6#term-backing-store), typically on disk. If
the [page](/u/5195e3271b5de55e#term-page) referenced by the virtual address is not
currently in main memory, a [page fault](/u/5195e3271b5de55e#term-page-fault) occurs,
triggering an operating system handler that [swaps in](/u/699ff3e2d070663d#term-swapped-in) the page. Some other page might be
[swapped out](/u/699ff3e2d070663d#term-swapped-out) to make room.
Each process typically has its own separate [virtual
address space](#term-virtual-address-space) with its own [mappings](/u/367f5f45f9800ccb#term-mapping) and
[protections](/u/5195e3271b5de55e#term-protection).

*Example of the relationship between the virtual address
spaces of two processes, physical memory, and backing
store.*
Virtual memory technology can be used in many useful memory
management techniques, such as [barriers (1)](/u/4c6aaf4e0e0b7eb6#term-barrier-1),
copy-on-write, and [memory mapping](/u/367f5f45f9800ccb#term-memory-mapping).
> “Virtual” means never knowing where your next byte is
> coming from. — `fortune(6)`
Opposite term
[real memory (1)](/u/611c5a77bde93a2f#term-real-memory-1).
See also
[mapped](/u/367f5f45f9800ccb#term-mapped), [paging](/u/5195e3271b5de55e#term-paging), [paged in](/u/5195e3271b5de55e#term-paged-in), [paged out](/u/5195e3271b5de55e#term-paged-out), [reserved](/u/611c5a77bde93a2f#term-reserved), [shared memory](/u/699ff3e2d070663d#term-shared-memory), [swapping](/u/699ff3e2d070663d#term-swapping), [swap space](/u/699ff3e2d070663d#term-swap-space), [unmapped](/u/ced5e8494ccaae80#term-unmapped).virtual memory arena : In the MPS
code
An [arena class](/u/9b03e2fad7c35ce0#term-arena-class) which gets its [memory (2)](/u/367f5f45f9800ccb#term-memory-2)
from the operating system’s [virtual memory](#term-virtual-memory)
interface. See [Virtual memory arenas](https://www.ravenbrook.com/project/mps/master/manual/html/topic/arena.html#topic-arena-vm).visitor function : See
code
[stepper function](/u/699ff3e2d070663d#term-stepper-function).VM(1) : See
code
[virtual memory](#term-virtual-memory).VM(2) : In the PostScript language, VM is the memory (1) where the values of the composite objects reside.
code
VM is short for “virtual memory”, but this has nothing to do
with the usual sense of the phrase (see [virtual memory](#term-virtual-memory)).