Andrew Philpot <philpot@isi.edu> wrote:
+---------------
| This is old, non-portable and incomplete. ...
...
| (defun object-internal-pointer (object)
| "Given an arbitrary object, return an integer (should be fixnum in
| many cases, unknown how Xerox and Gold Hill deal with this) which is
| unique to that object, generally its actual pointer address"
| (flet ((abut (x y)
| (+ y (* x (expt 10 (1+ (floor (log y 10))))))))
| #+CMU 0
...
+---------------
You can change the CMUCL entry to this:
#+cmu (kernel:get-lisp-obj-address object)
though be advised that due to the way CMUCL handles the memory
mapping for its heap, the result will probably be a FIXNUM only
for "small immediates", e.g.:
> (mapcar #'kernel:get-lisp-obj-address '(37 #\A 23.4 foo (bar) t nil))
(148 16806 1487569263 1486380807 1487569307 671088679 671088651)
> (mapcar #'fixnump *)
(T T NIL NIL NIL NIL NIL)
>
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607