Returns an integer specifying the representation of an object.
object-pointer object => result
A Lisp object.
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
(let ((gf #'make-instance))
(format t "~a pointer is ~x~%" gf
LispWorks User Guide and Reference Manual - 20 Sep 2017