pointer-storage-type

$Revision: 5.0.2.3 $

Function

Package: SYSTEM

Arguments: (object)

Returns a keyword denoting where object is stored. The four possible return values are

  1. :immediate, which means the object is not referenced with a pointer (fixnums, e.g.)
  2. :static, which means the object is stored in an area which is not garbage collected;
  3. :new, which means the object is stored in newspace; and
  4. :tenured, which means the object is stored in oldspace (also called tenured space).

See gc.htm for a discussion of where Lisp objects are stored. The general documentation description is in introduction.htm. The index is in index.htm.

;; A 1-d static array has storage type :STATIC

;;
(2-d and higher dimension
;; static arrays have headers that are Lisp objects so they will have
;; storage type :NEW or :TENURED, but their data vectors
;; (avaiable via INSPECT)
;; will have storage type :STATIC):
USER(24): (sys:pointer-storage-type (make-array 3 :allocation :static
                                      :element-type 'fixnum
                                      :initial-element 2))
:static
;; Fixnums are immediates:
USER(25): (sys:pointer-storage-type 22)
:immediate
;; Most Lisp objects start in new space:
USER(26): (setq a (cons 1 2))
(1 . 2)
USER(27): (sys:pointer-storage-type a)
:new
;; And after surviving several scavenges, move to oldspace:
USER(28): (gc) (gc) (gc) (gc) (gc)
USER(29): (sys:pointer-storage-type a)
:tenured

>

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.