5.2 Storage allocation

5.2.3 Displaying storage allocation reports

You can examine the current allocation of dynamic storage by calling the function room. Depending on its arguments,room reports three levels of detail:

When called with the argumentnil,room displays a terse storage allocation message:

> (room nil)
;;; 457464 words [1829856 bytes] free
NIL

When called with no arguments,room displays a descriptive storage allocation message:

> (room)
;;; 1030 words [4120 bytes] of dynamic storage in use.
;;; 457464 words [1829856 bytes] of free storage available 
;;; before a GC. 915958 words [3663832 bytes] of free 
;;; storage available if GC is disabled.
NIL

Callingroom with the keyword argument:default is equivalent to calling it with no arguments.

When called with the argumentt,room displays a verbose storage allocation message:

> (room t)
;;; 1030 words [4120 bytes] of dynamic storage in use.
;;; 457464 words [1829856 bytes] of free storage available 
;;; before a GC. 915958 words [3663832 bytes] of free 
;;; storage available if GC is disabled.
;;; Semi-space Size: 1792K bytes [28 segments]
;;; Current Dynamic Area: Dynamic-0-Area
;;; GC Status: Enabled
;;; Reserved Free Space: 3776K bytes [59 segments]
;;; Memory Growth Limit: 32768K bytes [512 segments], total
;;; Memory Growth Rate: 256K bytes [4 segments]
;;; Reclamation Ratio: 33% desired free after garbage collection
;;; Area Information: 
;;; Name                        Size [used/allocated]
;;; ----                        ----
;;; Ephemeral Level 0           8K/512K bytes,     1/8 segments
;;; Ephemeral Level 1           0K/640K bytes,     0/10 segments
;;; Ephemeral Level 2           0K/640K bytes,     0/10 segments
;;; Ephemeral Odd-level OSP     0K/512K bytes,     0/8 segments
;;; Ephemeral Even-level OSP    0K/640K bytes,     0/10 segments
;;; Dynamic-0-Area              5K/1791K bytes,    1/28 segments
;;; Dynamic-1-Area              0K/1792K bytes,    0/28 segments
;;; Discardable-Static-Area     2K/64K bytes,      1/1 segment
;;; Discardable-Read-Write-Area 588K/640K bytes,   10/10 segments
;;; Foreign Area                37K/64K bytes,     1/1 segment
;;; Static-Area                 523K/576K bytes,   9/9 segments
;;; Read-Write-Area             703K/704K bytes,   11/11 segments
;;; Readonly-Pointer-Area       1144K/1152K bytes, 18/18 segments
;;; Readonly-Non-Pointer-Area   3770K/3776K bytes, 59/59 segments
NIL

The first three lines in the verbose display give the amount of dynamic storage used in the current dynamic semi-space, the amount of free storage in the current semi-space, and the total amount of free storage in both semi-spaces. The next three lines report the size and name of the current semi-space and the status of the Dynamic Garbage Collector:

;;; Semi-space Size: 1792K bytes [28 segments]
;;; Current Dynamic Area: Dynamic-0-Area
;;; GC Status: Enabled

The next four lines give the current values of parameters that affect memory expansion:

;;; Reserved Free Space: 3776K bytes [59 segments]
;;; Memory Growth Limit: 32768K bytes [512 segments], total
;;; Memory Growth Rate: 256K bytes [4 segments]
;;; Reclamation Ratio: 33% desired free after garbage collection

The last section of the expandedroom report gives a breakdown of the current storage allocation by area. For each area, the report gives the total amount of storage allocated to that area and the current amount in use.

In accordance with the ANSI Common Lisp standard, informational messages about the garbage collector always get printed to the stream that is the value of*gc-output*. The default value for*gc-output*is a synonym stream that writes to*trace-output*.


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker