Next Previous Up Top Contents Index

18 The SYSTEM Package

object-address

Function

Summary

Returns the address of the given object as an integer.
Package

system

Signature

object-address object => address

Arguments

object

The object whose address should be returned.

Values

address

The address of object. An integer.

Description

Returns the address of the given object as an integer. Note that the address is likely to change during garbage collection so this integer should be used for debugging purposes only.
Example

This shows that the address returned bysys:object-address is the same as the one printed by theprint-object method forgeneric-function.
CL-USER 1 > (let ((gf #'initialize-instance))
               (format t "address = ~X~%gf = ~S" 
                  (sys:object-address gf) gf))
address = 1cff778
gf = #<STANDARD-GENERIC-FUNCTION INITIALIZE-INSTANCE 1cff778>
NIL

CL-USER 2 >

See also

pointer-from-address


LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker