In computer science, a bounded pointer is a pointer that is augmented with additional information that enable the storage bounds within which it may point to be deduced.[1] This additional information sometimes takes the form of two pointers holding the upper and lower addresses of the storage occupied by the object to which the bounded pointer points.

Use of bound information makes it possible for a compiler to generate code that performs bounds checking, i.e. that tests if a pointer's value lies within the bounds prior to dereferencing the pointer or modifying the value of the pointer. If the bounds are violated some kind of exception may be raised. This is especially useful for data constructs such as arrays in C.

See also

edit

References

edit
  1. ^ Reese, Richard (2013). Understanding and Using C Pointers: Core Techniques for Memory Management. O'Reilly Media, Inc. p. 167. ISBN 9781449344566.


📚 Artikel Terkait di Wikipedia

Pointer (computer programming)

constant Bounded pointer Buffer overflow Cray pointer Fat pointer Function pointer Hazard pointer Indirection Iterator Opaque pointer Pointee Pointer swizzling

Boundedness

Look up bounded in Wiktionary, the free dictionary. Boundedness, bounded, or unbounded may refer to: Bounded rationality, the idea that human rationality

Dangling pointer

Dangling pointers and wild pointers in computer programming are pointers that do not point to a valid object of the appropriate type. These are special

Reference (computer science)

its $$var syntax. Abstraction (computer science) Autovivification Bounded pointer Indirection Linked data Magic cookie Reference Weak reference Sherman

Stack (abstract data type)

for example, a singly linked list with a pointer to the top element. A stack may be implemented to have a bounded capacity. If the stack is full and does

The Power of 10: Rules for Developing Safety-Critical Code

a minimum. The use of pointers must be restricted. Specifically, no more than one level of dereference should be used. Pointer dereference operations

Pointer algorithm

In computer science, a pointer algorithm (sometimes called a pointer machine, or a reference machine; see the article Pointer machine for a close but non-identical

Virtual method table

the class that points to an array of pointers to (virtual) functions called the virtual method table. These pointers are used at runtime to invoke the appropriate