Next Previous Up Top Contents Index

4.2 Tracing options

4.2.8 Storing the memory allocation made during a function call

:allocation

Trace keyword

:allocation form

If form is non-nil, this prints the memory allocation, in bytes, made during a function call. The symbol that form evaluates to is used to accumulate the amount of memory allocated between entering and exiting the traced function.
Note that this symbol continues to be used as an accumulator on subsequent calls to the traced function; the value is compounded, rather than over-written.

Consider the example below:

1. For thefac function, set the value of:allocation to$$fac-alloc.
2. In the listener, callfac, and then examine the value of$$fac-alloc.
CL-USER 152 > $$fac-alloc
744

LispWorks User Guide - 14 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker