Jump to content

Bounded pointer

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jeodesic (talk | contribs) at 18:32, 14 November 2006 (Stub-sorting. You can help!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A bounded pointer is a fundamental programming language datatype, much as the pointer. A bounded pointer is a pointer that is augmented with to additional pointers. These two additional pointers hold the upper and lower bound of the object to which the bounded pointer is seated.

The pointers to the upped and lower bound of the objects makes is possible for the compiler to generate code that test if the pointer's value lies within the bounds prior to dereferencing the pointer. If the bounds are violated the program generates a machine exception. This is especially useful for data constructs such as arrays in C.