Next Prev Up Top Contents Index

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 the fac function, set the value of :allocation to $$fac-alloc .
  2. In the listener, call fac , and then examine the value of $$fac-alloc .
CL-USER 152 > $$fac-alloc
744

LispWorks User Guide - 18 Feb 2003

Next Prev Up Top Contents Index