All Manuals > LispWorks User Guide and Reference Manual > 27 The COMMON-LISP Package

NextPrevUpTopContentsIndex

room

Function
Summary

Print information about the state of internal storage and its management.

Package

common-lisp

Signature

room &optional x

Arguments

x

One of nil , t , or :default .

Values

room returns no values.

Description

This function provides statistics on the current state of the storage, including the amount of space currently allocated, and the amount available for allocation.

As outlined in the Common Lisp Hyperspec, the room function takes an optional argument which controls the level of detail it produces.

Given an argument of nil , a summary of the total allocation in the entire heap (in kilobytes) is produced. The "allocated" figure only represents the amount of space allocated in heap segments that are writable, as opposed to read-only segments that hold some of the system code such as the garbage collector (GC) itself. The free space figure covers all the free space in all segments. To obtain these values programmatically, call room-values.

When called without an argument, room additionally prints information on the distribution of space between the generations of the heap.

When called with argument t , a breakdown of allocation in the individual segments of each generation is produced. Each segment is identified by its start address in memory. For each segment there is a free space threshold (the "minimum free space")--when the available space in the segment falls below this value, the GC takes action to attempt to free more space in this segment.

Two statistics about promotion are also reported on a per-segment basis: the number of sweeps that an object must survive in this generation before becoming eligible for promotion, and the total volume of objects that have survived for that long and are consequently awaiting promotion to the next generation. These statistics are not relevant for static segments, which are indicated as "static".

room prints numbers in decimal format, except for the segment start addresses which it prints in hexadecimal format.

Examples
CL-USER 22 > (room nil)
 
Total Size 39424K, Allocated 32591K, Free 6461K
 
CL-USER 23 > (room)
 Generation 0:  Total Size 4394K, Allocated 952K, Free 3433K 
 Generation 1:  Total Size 1397K, Allocated 795K, Free 589K 
 Generation 2:  Total Size 4292K, Allocated 2172K, Free 2111K 
 Generation 3:  Total Size 29009K, Allocated 28885K, Free 112K 
 
Total Size 39424K, Allocated 32805K, Free 6247K
 
CL-USER 24 > (room t)
 Generation 0:  Total Size 4394K, Allocated 1004K, Free 3382K 
          Segment 2008EC80: Total Size 507K, Allocated 353K, Free 149K
                    minimum free space 64K, 
                      Awaiting promotion = 23K, sweeps before promotion =10
          Segment 222B4498: Total Size 3886K, Allocated 650K, Free 3232K
                    minimum free space 0K, 
                      Awaiting promotion = 51K, sweeps before promotion =2
 Generation 1:  Total Size 1397K, Allocated 795K, Free 589K 
          Segment 2070DC18: Total Size 68K, Allocated 64K, Free 0K
                    minimum free space 3K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 21D84498: Total Size 1088K, Allocated 613K, Free 470K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 200528D8: Total Size 240K, Allocated 118K, Free 118K
                    minimum free space 0K, static
 Generation 2:  Total Size 4292K, Allocated 2172K, Free 2111K 
          Segment 21E94498: Total Size 4224K, Allocated 2107K, Free 2111K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 20E7DC18: Total Size 68K, Allocated 64K, Free 0K
                    minimum free space 117K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
 Generation 3:  Total Size 29009K, Allocated 28885K, Free 112K 
          Segment 2071EC90: Total Size 7547K, Allocated 7543K, Free 0K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =10
          Segment 20E8EC90: Total Size 15318K, Allocated 15201K, Free 112K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =10
          Segment 2010DC18: Total Size 6144K, Allocated 6139K, Free 0K
                    minimum free space 3K, 
                      Awaiting promotion = 0K, sweeps before promotion =10
 
Total Size 39424K, Allocated 32857K, Free 6195K
See also

find-object-size
room-values
total-allocation


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex