dereference

(redirected from dereferences)

dereference

(programming)
To access the thing to which a pointer points, i.e. to follow the pointer. E.g. in C, the declarations

int i; int *p = &i;

declare i as an integer and p as a pointer to integer. p is initialised to point at i ("&i" is the address of i - the inverse of "*"). The expression *p dereferences p to yield i as an lvalue, i.e. something which can appear either on the left of an assignment or anywhere an integer expression is valid. Thus

*p = 17;

would set i to 17. *p++ is not the same as i++ however since it is parsed as *(p++), i.e. increment p (which would be an invalid thing to do if it was pointing to a single int, as in this example) then dereference p's old value.

The C operator "->" also dereferences its left hand argument which is assumed to point to a structure or union of which the right hand argument is a member.

At first sight the word "dereference" might be thought to mean "to cause to stop referring" but its meaning is well established in jargon.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)

dereference

To go to an address before performing the operation. For example, in C programming, a dereferenced variable is a pointer to the variable, not the variable itself. The expression int Num; declares an integer variable named "Num." The expression *pNum = &Num; places the address of the variable Num (not its contents) into the pointer. The ampersand is the "address of" operator.

Another example is found in the tar archiving program. The dereference switch causes files referenced by symbolic links to be archived rather than the symbolic link itself. The term always refers to "following the link" in order to obtain the intended resource. See symbolic link.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
class="MsoNormalWhen the case came up for hearing on Wednesday, Justice Mshilla observed the need for the parties to try settling their dereferences outside the court.
The service is designed to find the most common and critical issues in Java code bases, including resource leaks, race conditions, concurrency issues, control flow issues, null pointer dereferences, issues detected by the open source FindBugs tool, copy and paste errors, and many other software defects resulting in incorrect or unpredictable program behavior.
Analogously, the aim of frequent dereferences elimination is to introduce new variables to accommodate values of frequent dereferences and reusing these values rather than reaccessing the memory.
By introducing the [P.sub.tablecheck](v) policy, Icefex focuses on the targeted address dependencies and avoids the explosion caused by full symbolic pointer dereferences [21].
(1) It employs novel static analysis techniques, combined with model checking and constraint solving to search for common predefined software defects such as buffer overflows or null-pointer dereferences with very low rates of false positives.
After locating the URI of a resource, the LOD retrieval process dereferences that URI at the DBpedia server to get the respective resource RDF description.
Fixed locations do not contain any dereferences. For example in C syntax, x and x.f are fixed locations.
To minimize the runtime overhead of software address translation, only two types of accesses are translated in MGS: pointer dereferences and accesses to elements of distributed arrays.
For example, without alias analysis, the compiler must assume all pointer dereferences are potential aliases and may not reorder them.