* WHERE-IS library doc * Gather keyboard files, add VIRTUAL.TEDIT * add UNIXCOMM.TEDIT * rest of TEdit library files * save table of contents index for reworking * Don't move around VIRTUALKEYBOARDS files; will move in separate commit * Add MATMULT from Envos/Medley
43 lines
27 KiB
Plaintext
43 lines
27 KiB
Plaintext
1
|
||
|
||
Lisp Library Modules, Medley Release 1.0, GCHAX
|
||
1
|
||
|
||
Lisp Library Modules, Medley Release 1.0, GCHAX
|
||
GCHAX
|
||
1
|
||
|
||
GCHAX
|
||
1
|
||
|
||
|
||
GCHAX
|
||
6
|
||
|
||
GCHax contains functions that are useful for tracking down storage leaks, i.e., objects that should be garbage but do not get garbage collected. There are functions for examining reference counts, locating pointers to objects, and finding circularities (which are among the chief culprits in storage leaks).
|
||
Typically, you might turn to GCHax(GCHAX NIL GCHax NIL NIL 105) when you notice that STORAGE claims there are more instances of a data type in use than you believe there should be.
|
||
Installation
|
||
1
|
||
|
||
Load GCHAX.LCOM from the library.
|
||
Functions
|
||
1
|
||
|
||
Storage
|
||
The function STORAGE displays statistics on the amounts and distribution of the virtual memory space that has been allocated. If you suspect your program may have storage leaks (e.g., because (VMEMSIZE) keeps growing without obvious reason), this function is the place to start to get an indication of which kinds of objects are not being reclaimed. STORAGE is part of the standard Lisp sysout; you need not have loaded GCHAX to use it.
|
||
((STORAGE (Function) NIL NIL NIL 105)STORAGE TYPES PAGE-THRESHOLD IN-USE-THRESHOLD) [Function]
|
||
With no arguments, STORAGE displays statistics for all data types, along with some summary information about the space remaining. The optional arguments let you refine the display.
|
||
If TYPES is given, STORAGE only lists statistics for those types. TYPES should be a type name or list of type names.
|
||
If PAGE-THRESHOLD is given, then STORAGE omits types that have fewer than PAGE-THRESHOLD pages allocated to them. The default PAGE-THRESHOLD is 2, so types that are not currently in use (consume no storage) do not appear unless you specify a PAGE-THRESHOLD of zero.
|
||
If IN-USE-THRESHOLD is given, then STORAGE omits types that have fewer than IN-USE-THRESHOLD instances in use (allocated and not yet freed).
|
||
For example, (STORAGE '(ARRAYP BITMAP)) lists only statistics for the types ARRAYP and BITMAP; (STORAGE NIL 6) lists only statistics for data types that have at least six pages allocated. (STORAGE NIL NIL 100) lists only statistics for data types that have at least 100 instances still in use.
|
||
The STORAGE function displays, for each Lisp data type, the amount of space allocated to the data type, and how much is currently in use. The display looks something like this:
|
||
|
||
Type Assigned Free items In use Total alloc
|
||
pages [items]
|
||
FIXP 66 8448 7115 1333 447038
|
||
FLOATP 24 3072 2412 660 734877
|
||
LISTP 2574 ~298584 5294 ~293290 3545071
|
||
ARRAYP 8 512 245 267 48199
|
||
. . .
|
||
|
||
Type Is the name of the data type, as given to DATATYPE or the Common Lisp DEFSTRUCT.
|
||
Assigned Is how much of your virtual memory is set aside for items of this type. Memory is allocated in quanta of two pages (1024 bytes). The numbers under Assigned show the number of pages and the total number of items that fit on those pages. The tilde (~) on the LISTP line indicates that the number is approximate, since cdr-coding makes the precise counting of lists impossible<6C><65> |