Memory Management Glossary: P

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


Padding is redundant memory (2) within the memory allocated to an object. It is usually inserted because of alignment restrictions on the fields of the object or on the object itself.

Padding is a form of internal fragmentation.

padding method

In the MPS

A format method that is called by a moving pool to create a padding object. See mps_fmt_pad_t.

padding object

In the MPS

A formatted object that consists of padding. One of three types of formatted objects, the other two being client objects and forwarding objects.


A virtual memory system usually deals with memory (1) blocks of fixed size as units for paging. These are known as pages.

Pages are often 4 kB or 8 kB in size. This size is determined by the addressing hardware of the machine.

page fault

An exception when accessing virtual memory, usually resulting in a page being fetched from disk.

A page fault is an exception occurring during the translation of virtual addresses to physical addresses. “Page fault” usually means an access to a page that has been paged out and hence requires fetching from disk, but it is sometimes also used to mean invalid page fault or protection fault.

page marking

Page marking is a form of card-marking where the card is the same size as a page

page protection



Many operating systems support protection of memory (2) pages. Individual pages may be protected against a combination of read, write or execute accesses by a process.

page table

In a virtual memory system, it is common to map between virtual addresses and physical addresses by means of a data structure called a page table.

The page number of an address is usually found from the most significant bits of the address; the remaining bits yield the offset of the memory location within the page. The page table is normally indexed by page number and contains information on whether the page is currently in main memory, and where it is in main memory or on disk.

Conventional page tables are sized to the virtual address space and store the entire virtual address space description of each process. Because of the need to keep the virtual-to-physical translation time low, a conventional page table is structured as a fixed, multi-level hierarchy, and can be very inefficient at representing a sparse virtual address space, unless the allocated pages are carefully aligned to the page table hierarchy.

paged in

In a virtual memory system, memory (2) is described as paged in if it is available in physical memory (1).

Similar term

swapped in.

Opposite term

paged out.

See also


paged out

In a virtual memory system, memory (2) is described as paged out if it is not available in physical memory (1).

Similar term

swapped out.

Opposite term

paged in.

See also



In a virtual memory system, paging is the act of transferring pages between physical memory (1) and backing store (usually disk).

When pages need to be paged out, a heuristic is used to select ones that will not be needed soon; “least recently used” is a popular one.

Similar term


See also

paged in, paged out.


A block of memory (2) that has been allocated, freed (1) (or reclaimed), and then allocated again. Such memory may contain data from the previous use if portions of it remain uninitialised.

This commonly occurs on the stack, especially if the compiler allocates large stack frames in anticipation of allocating data structures on the stack.

If the palimpsest is being scanned conservatively, such left-over data may cause unreachable objects to appear reachable and thus become floating garbage. If it is scanned precisely, such left-over data, if treated as pointers, is a bug.

parallel garbage collection

Also known as

concurrent garbage collection.

A parallel or concurrent collector (2) executes simultaneously with the mutator, usually on a multi-processor machine.

Concurrent garbage collection must cope with the mutator changing objects while collection occurs. The problem is similar to that of incremental GC, but harder. The solution typically involves barriers (1).

Similar term


parked state

In the MPS

One of the four states an arena can be in (the others being the clamped state, the postmortem state, and the unclamped state). In the parked state, no garbage collection is in progress, no object motion occurs and the staleness of location dependencies does not change. Call mps_arena_park() or mps_arena_collect() to put an arena into the parked state.

perfect fit

If an allocation request is satisfied exactly from a free block with no fragmentation, this is said to be a perfect fit.

phantom reachable
phantomly reachable

In Java, an object is phantom reachable if it is neither strongly nor softly nor weakly reachable and has been finalized and there is a path from the roots to it that contains at least one phantom reference.

When the Java collector (1) determines that an object is phantom reachable, the reference objects containing the phantom references are enqueued.

The Java specification says that the phantom reference is not cleared when the reference object is enqueued, but actually, there’s no way in the language to tell whether that has been done or not. In some implementations, JNI weak global references are weaker than phantom references, and provide a way to access phantom reachable objects.

See also


phantom reference

In Java terminology, phantom reference is used to mean a reference encapsulated in a reference object of class PhantomReference.

Phantom references form one of three kinds of weak reference (1) in Java. They are handy for performing clean-ups after an object has died and been finalized.

See also

phantom reachable.

physical address

Also known as

absolute address.

Physical addresses are used to index into physical memory (1). On some systems, they are called absolute addresses.

In a virtual memory system the application program handles virtual addresses and these are translated to physical addresses by the MMU.

Opposite term

virtual address.

physical address space

The physical address space is the space of physical addresses.

Opposite term

virtual address space.

physical memory(1)

Also known as

real memory.

Physical memory is memory (1) that is wired to directly to the processor, addressable by physical address.

This term is basically synonymous to main memory, but is used in contrast to virtual memory and backing store.

While modern computers usually have lots of virtual memory, performance is still closely related to the quantity of physical memory available. If a system has insufficient physical memory, it may thrash.

Similar term

main memory.

physical memory(2)

Also known as

physical storage.

Physical memory is memory (1) on physical storage devices, such as RAM or disks.

This term is often contrasted to virtual address space that might not be mapped to any actual storage.

Similar term

memory (1).

physical storage
pig in the python

Also known as

pig in the snake.

In a generational collector, when long-lived objects are allocated in nursery space, collection effort will be wasted as those objects survive and are promoted from generation to generation. This is especially noticeable in a copying collector, where long-lived objects will be copied many times. This difficulty is similar to that of a python which swallows its prey whole and is somewhat immobilized as it digests it.

Modern collectors permit objects to be allocated directly into appropriate generations or pools to avoid this problem. Long-lived objects can be allocated directly into long-term generations. Large objects can be allocated directly into pools with special support for large objects (such as copying by remapping, incremental copying, or not copying at all).

In the MPS

A pool can be configured to allocate into a specific generation in its generation chain by setting the MPS_KEY_GEN keyword argument when calling mps_pool_create_k().

pig in the snake

Also known as


In copying garbage collection, an object may not be movable because it is the target of an ambiguous reference or because it is referenced by foreign code that does not co-operate with the collector. Such an object is said to be pinned.

placement policy

In the MPS

The term platform is used to refer to the combination of operating system, processor architecture, and compiler. See Platforms.


In the MPS

The plinth is a program module providing the MPS with all the support functions it needs from the execution environment. The plinth removes the need for external libraries, by getting the support from the client program. See Plinth.


Pointer data types represent a reference to an object or a location.

Pointers may be specialized by the type of the object referred to.

Typically, pointers are represented by an address, but they can be more complicated when they need to carry more information. For example, when the referent is smaller than a word, an offset within the word might be needed.

Similar terms

address, reference.

See also



In the MPS

A pool is responsible for requesting memory from the arena and making it available to the client program via mps_alloc() or via an allocation point. Multiple pools can coexist in one arena. Pools belong to the type mps_pool_t. See Pools and the Pool reference.

pool class

In the MPS

A value of type mps_pool_class_t describing a class of pools that manage memory according to particular policy. See Pool reference.

postmortem state

In the MPS

One of the four states an arena can be in (the others being the unclamped state, the clamped state, and the parked state). In the postmortem state, objects do not move in memory, the staleness of location dependencies does not change, memory occupied by unreachable objects is not recycled, all memory protection is removed, and memory may be in an inconsistent state. Call mps_arena_postmortem() to put an arena into the postmortem state.

precise garbage collection
precise reference
precise root


exact root.

premature free

Also known as

use after free.

A premature free or use after free occurs when memory (2) is deallocated, but is later accessed.

Under manual memory management, this usually occurs when one part of a program decides it has finished using a memory block, and is unaware that another part of the program is still using it. This is rare under automatic memory management.

See also

double free.

premature promotion
premature tenuring

Also known as

premature promotion.

When a short-lived object allocated in a generational garbage collector is promoted (due to poor timing) into a less-frequently collected generation. This prematurely tenured object may become garbage very soon after promotion, but will not be reclaimed for some time because it is now in a less frequently collected generation.

This problem is essentially due to quantization error: all objects in a generation are treated as if they have the same age, even though they range from as old as the previous promotion cycle to new-born.

Modern collectors (1) offer several remedies for premature tenuring. If the client program knows that it is entering a phase that will create many short-lived objects, it can forestall all promotion until it knows it is done with those objects. Thus no objects will be prematurely promoted: they will all be seen as garbage. Another solution is to create buckets within generations to more accurately classify objects by age and only promote those which have reached a certain minimum.

primary storage

Also known as


Promotion or tenuring is the act of moving an object from its current generation to an older one (one that contains objects that are expected to survive longer).

“Tenuring” is used particularly about promotion to the oldest generation.

protectable root

In the MPS

A root which the MPS may protect with a write barrier. A protectable root is created by specifying the root mode MPS_RM_PROT when calling a registration function such as mps_root_create().


A region of memory (2) is said to be protected if there is a barrier (1) on that region.

Opposite term



Also known as

memory protection, page protection.

Many operating systems support protection of memory (2) pages. Individual pages may be protected against a combination of read, write or execute accesses by a process.

A process which attempts a protected access will trigger a protection fault. Protection is typically implemented in hardware by the MMU as part of the support for virtual memory .

Pages can be protected for a number of reasons: a generational or incremental garbage collector may want to place barriers (1) on pages; an operating system may want to protect pages for security, or to implement “copy-on-write” or “demand-zero-filled” pages.

See also

read fault, write fault.

protection exception
protection fault

Also known as

barrier hit, protection exception, protection violation.

A protection fault is an exception or trap which occurs when a process attempts to access memory (2) which has been protected.

Relevance to memory management

Some garbage collectors use handlers for protection faults to provide barriers (1).

protection violation