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 itself. The free space figure covers all the free space in all segments.

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 garbage collector 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 23 > (room nil)
 
Total Size 50752K, Allocated 42868K, Free 7522K
 
CL-USER 24 > (room)
 Generation 0:  Total Size 2778K, Allocated 519K, Free 2251K 
 Generation 1:  Total Size 3958K, Allocated 2524K, Free 1413K 
 Generation 2:  Total Size 24324K, Allocated 20730K, Free 3572K 
 Generation 3:  Total Size 19391K, Allocated 19266K, Free 112K 
 
Total Size 50752K, Allocated 43040K, Free 7349K
 
CL-USER 25 > (room t)
 Generation 0:  Total Size 2778K, Allocated 561K, Free 2208K 
          Segment 200877D8: Total Size 507K, Allocated 457K, Free 46K
                    minimum free space 64K, 
                      Awaiting promotion = 1K, sweeps before promotion =10
          Segment 22F58548: Total Size 2270K, Allocated 104K, Free 2162K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =2
 Generation 1:  Total Size 3958K, Allocated 2524K, Free 1413K 
          Segment 21C08548: Total Size 1472K, Allocated 1423K, Free 44K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 22198548: Total Size 1088K, Allocated 778K, Free 305K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 20706770: Total Size 68K, Allocated 3K, Free 60K
                    minimum free space 3K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 216D8548: Total Size 1088K, Allocated 213K, Free 870K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 2004AFA8: Total Size 242K, Allocated 105K, Free 132K
                    minimum free space 0K, static
 Generation 2:  Total Size 24324K, Allocated 20730K, Free 3572K 
          Segment 222A8548: Total Size 12992K, Allocated 9527K, Free 3460K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 21D78548: Total Size 4224K, Allocated 4110K, Free 109K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 21418548: Total Size 2816K, Allocated 2811K, Free 0K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 217E8548: Total Size 4224K, Allocated 4218K, Free 1K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
          Segment 20DBDDC8: Total Size 68K, Allocated 63K, Free 0K
                    minimum free space 117K, 
                      Awaiting promotion = 0K, sweeps before promotion =4
 Generation 3:  Total Size 19391K, Allocated 19266K, Free 112K 
          Segment 20106770: Total Size 6144K, Allocated 6139K, Free 0K
                    minimum free space 3K, 
                      Awaiting promotion = 0K, sweeps before promotion =10
          Segment 20DCEE40: Total Size 6437K, Allocated 6321K, Free 112K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =10
          Segment 207177E8: Total Size 6809K, Allocated 6805K, Free 0K
                    minimum free space 0K, 
                      Awaiting promotion = 0K, sweeps before promotion =10
 
Total Size 50752K, Allocated 43083K, Free 7307K
See also

find-object-size
room-values
total-allocation


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex