Returns an integer specifying the representation of an object.
system
object-pointer object => result
object⇩ |
A Lisp object. |
result |
An integer. |
The function object-pointer
returns an integer specifying the actual representation of the object object. For most objects, that would be the pointer to it, which is its address (as returned by object-address) plus some tag. Some objects are "immediate" (that is they do not use memory, and immediatep returns t
) and for these object-pointer
returns the actual address.
The Garbage Collector can move objects, therefore the result of object-pointer
is not permanent. It should be used only for debugging.
The result of object-pointer
is what cl:print-unreadable-object uses for the object's "identity". It is normally what appears when using cl:print-unreadable-object with identity t
.
(let ((gf #'make-instance)) (format t "~a pointer is ~x~%" gf (sys:object-pointer gf)))
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02