The Memory Management Glossary
H

 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.


handle

A handle is an object that represents a resource.

Handles are used when the resource cannot be represented directly. For example, a file handle is an object passed between a process and the OS in order to access a file, because the file itself cannot be represented.

Relevance to memory management: In memory management, a handle is an object that represents another object. Handles are usually used because the object itself needs to be moved in memory(2), or even swapped out to disk. The program therefore cannot know the address of the object.

For example, the Mac® OS makes extensive use of handles in its heap management to avoid problems due to fragmentation. If the Mac OS Memory Manager cannot satisfy a request for memory, it may try compacting the heap -- moving all the relocatable objects together to squeeze out gaps. It can do this because the program only has handles on the objects, and not their actual addresses.

Legend
Diagram: Legend

Handle-based heap before compaction
Diagram: Handle-based heap before compaction

Handle-based heap after compaction
Diagram: Handle-based heap after compaction

Similar terms: pointer.

header (for full details, see in-band header)

Some memory managers allocate a fixed amount more than is necessary for each block and use it to store information such as the size of the block or a tag. This extra memory is known as an in-band header or a frame

heap (also known as free store, freestore)

The heap or free store is the memory(2) area managed by dynamic allocation.

This use of heap is unconnected with the data structure used by the heapsort algorithm.

heap allocation (also known as dynamic allocation)

Heap allocation or dynamic allocation means run-time allocation and deallocation of storage in arbitrary order.

Dynamic allocation is usually for objects whose size, quantity, or lifetime could not be determined at compile-time. It is necessary to implement modern data structures, such as recursive trees and full closures.

Objects on the heap can be managed manually, as in C, or automatically, as in Lisp and JavaTM.

Opposites: stack allocation; static allocation.
See also: indefinite extent.

hit

A hit is a successful lookup in any form of cache(3), most commonly at some level of a storage hierarchy, such as a cache(1) or virtual memory(1) system.

Opposites: miss.

hit rate

At any level of a storage hierarchy, the hit rate is the proportion of accesses which hit.

Opposites: miss rate.

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