(redirected from dereferencing)


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.


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.
References in periodicals archive ?
When dereferencing a multilevel pointer, as the data read from the specific memory address are a pointer to their own effective memory address, a solution must exist, no matter how many ranks the pointer to be dereferenced has.
Even though the design principles--identifier, dereferencing, data structure, and query language--are essential, this particular combination of technologies--URI, HTTP, RDF, SPARQL--is not required for building a web of data.
Therefore, each time for the kernel to fetch the current task, it first gets the thread_info by bit-masking ESP with 8192 and then dereferencing the task_struct field in thread_info.
In Linked Data research [36, 37], dereferencing the URIs of resources through HTTP protocol can be exploited to incrementally obtain the description of resources.
Examples of insecure coding practices include array indices out of range and dereferencing a null pointer.
Dereferencing URIs for noninformation resources should lead to information about these resources, for example, RDF triples about a person.
Since the content of address referenced by [S.sub.1] is possibly changed after executing the statement, all statements involving dereferencing this address are removed from the set of ready items.
Mudflap instruments all risky pointer/array dereferencing operations and a variety of other risky constructs.
The process of dereferencing tries to take as big fragment of the semantics as possible and match it against the most general historical entity found closest to the "present." If a match is found, the entity is transformed into a semantics replacing the original fragment in the input.
"With Java, you worry less about memory management; de-allocating or dereferencing memory, running over a buffer limit.
Calling a primitive operation on the base class when dereferencing the access type will cause the appropriate operation to be called.
Using a single alias pair from the RA set to determine calling context yields a safe approximate solution of realizable paths for programs containing multiple levels of dereferencing; this is the reaching alias (RA) approximation used for calling context in [MOD.sub.C](FSAlias) at procedure entry.