The Memory Management Glossary
P

 Contents | News | Glossary | FAQ | Articles | Bibliography | Links | Feedback

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 - Help

Our aim is for these entries to be accurate, comprehensible, and useful, and also to have an entry for all common memory management terms. If you can't find the term you're looking for, if our definition doesn't help you, or if you'd like to suggest corrections or additions, please let us know via our feedback page.

For an explanation of the structure of the entries, and information on how to link to definitions, please see the glossary help page.


padding

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.

page

A virtual memory(1) 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, page-fault

An exception when accessing virtual memory(1), 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.

See also: paging; paged in; paged out; read fault; write fault.

page marking, page-marking

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

page protection (for full details, see 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(1) 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 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.

See also: inverted page table.

paged in

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

Similar terms: swapped in.
Opposites: paged out.
See also: paging.

paged out

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

Similar terms: swapped out.
Opposites: paged in.
See also: paging.

paging

In a virtual memory(1) 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 terms: swapping.
See also: paged in; paged out.

palimpsest

A block of memory(2) that has been allocated, freed (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 GC 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 terms: incremental.
See also: replicating garbage collector.

Related publications:


perfect fit

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

See also: free block; allocation mechanism; best fit.

phantom reachable, phantomly reachable

In JavaTM, 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: reachability.
Other links: Java spec for class PhantomReference; Reference Objects and Garbage Collection.

phantom reference

In JavaTM 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.
Other links: Java spec for class PhantomReference; Reference Objects and Garbage Collection.

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(1) system the application program handles virtual addresses and these are translated to physical addresses by the MMU.

Opposites: virtual address.

physical address space

The physical address space is the space of physical addresses.

Opposites: virtual address space.

physical memory(1) (also known as real memory(2))

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(1) and backing store.

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

Similar terms: 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 terms: memory(1).

physical storage (for full details, see physical memory(2))

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

pig in the python (also known as pig in the snake)

In a generational collector, when a large and long-lived object is allocated in nursery space, collection effort will be wasted as that object survives and is promoted from generation to generation. This is especially noticeable in a copying collector, where the large object 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).

See also: generational garbage collection.

pig in the snake (for full details, see pig in the python)

In a generational collector, when a large and long-lived object is allocated in nursery space, collection effort will be wasted as that object survives and is promoted from generation to generation. This is especially noticeable in a copying collector, where the large object 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.

placement policy (for full details, see allocation policy)

The concrete policy used by an allocator for choosing a free block to satisfy an allocation request.

pointer

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, e.g., when the referent is smaller than a word, an offset within the word might be needed.

Similar terms: reference; address.
See also: tag.

precise garbage collection (for full details, see exact garbage collection)

Garbage collection is exact (or precise) if it deals only with exact references.

precise reference (for full details, see exact reference)

An exact or precise or sure reference is a value the collector(1) knows is a reference.

precise root (for full details, see exact root)

An exact or precise root is a root that contains only exact references.

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 (for full details, see premature tenuring)

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.

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 (for full details, see main memory)

The main memory (or primary storage) of a computer is memory(1) that is wired directly to the processor, consisting of RAM and possibly ROM.

promotion (also known as tenuring)

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.

See also: generational garbage collection.

protection (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(1) .

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.

Related publications:


protection exception (for full details, see protection fault)

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

protection fault (also known as 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).

See also: segmentation violation; General Protection Fault.

protection violation (for full details, see protection fault)

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

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 - Help