Memory Management Reference

« Memory Management Glossary: M | Memory Management Glossary: N | Memory Management Glossary: O »

Memory Management Glossary: N

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




natural alignment

Natural alignment is an alignment constraint such that all objects must be aligned to an address that is a multiple of their size.

Natural alignment is not usually required for objects larger than a word or grain, which usually only need to be word- or grain-aligned.

See also

alignment, padding.

In the MPS

The MPS platform interface defines the C preprocessor macro MPS_PF_ALIGN to be the natural alignment of the platform.


In generational garbage collection nepotism is the tendency for dead objects in old generations to preserve younger dead objects that are referenced by them. In other words, dead parents can cause their children to get promoted.

This happens when an object gets promoted to an old generation and dies there, but does not get reclaimed because the generation it is in does not get considered for garbage collection very often. The old object might refer to objects in younger generations that are also dead; until the old object is reclaimed the younger objects will be preserved by virtue of the reference from the older, assumed alive, object.

This is a form of floating garbage introduced by partitioning the objects into generations.

next fit

A variant of the first fit allocation mechanism that uses a roving pointer on a circular free block chain. The pointer is advanced along the chain when searching for a fit. Thus each allocation begins looking where the previous one finished. The rationale is to avoid creating an accumulation of small fragments at the head of the free block chain, which would have to be examined on every allocation.

There are several variants, according to the order of blocks on the free block chain. The most common variant is address-ordered next fit.

This has a tendency to spread related objects out in memory, and also gives quite poor locality for the allocator (as the roving pointer rotates around memory, the free blocks touched are those least-recently used).

new space




In a graph, a node is a representation of an object at the junction of zero or more edges.

Opposite term


See also


non-moving garbage collector
non-moving memory manager

A memory manager is said to be non-moving if allocated objects do not move during their lifetimes.

Non-moving memory management techniques include mark-sweep collection, reference counting, and most kinds of manual memory management.

Opposite term

moving garbage collector.

nursery generation
nursery space

Also known as

nursery generation.

In generational garbage collection, the nursery generation or space is the area used for new allocation.

The size of the nursery space must be chosen carefully. Often it is related to the size of physical memory(1).

In the MPS

By default, a garbage-collected pool allocates into the first generation in its generation chain, but this can be altered by setting the MPS_KEY_GEN keyword argument when calling mps_pool_create_k().