FunctionPackage: systemToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

pointer-storage-type

Arguments: object

Use of this function is deprecated. Please use lispval-storage-type instead. Calls to pointer-storage-type can be changed to a call to lispval-storage-type with the same argument (and lispval-storage-type also accepts a second, optional argument). Thus

(sys:pointer-storage-type object)

can be changed to

(sys:lispval-storage-type object)

Returns a keyword denoting where object is stored. The 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. :tenured, which means the object is stored in oldspace (also called tenured space).
  4. :new, which means the object is stored in newspace but will, if it survives, eventually be tenured.
  5. :pan, which means that the object is stored in newspace and will never be tenured. (The name comes from Peter Pan, who never grew old.) See the note just below. (Note that lispval-storage-type returns the keyword :panified rather than :pan.)

Note on :pan objects: Only system-created objects can have storage type :pan but sometimes these objects are created as a consequnce of user action. The key vector of a weak-keys hashtable is typically a :pan object, though this can be controlled. See cl:make-hash-table in implementation.htm.

See gc.htm for a discussion of where Lisp objects are stored.

;; 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
;; (available 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version