All Manuals > LispWorks® User Guide and Reference Manual > 47 The SYSTEM Package

pointer-from-address Function

Summary

Returns the object into which the given address is pointing.

Package

system

Signature

pointer-from-address address => object

Arguments
address
An integer giving the address of the object.
Values
object
The object pointed to by address.
Description

The function pointer-from-address returns the object into which the given integer address is pointing. Note that this address may not be pointing into this object after a garbage collection, unless the object is static and is still referenced by another Lisp variable or object.

Examples
CL-USER 8 > (setq static-string
                  (make-array 3 
                              :element-type 'base-char 
                              :allocation :static))
Warning: Setting unbound variable STATIC-STRING
")?"
 
CL-USER 9 > (sys:object-address static-string)
537166552
 
CL-USER 10 > (sys:pointer-from-address *)
")?"
 
CL-USER 11 > (eq * static-string)
T
See also

object-address
object-pointer


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02