Displays the current state of the AutoLISP memory
mem function displays statistics on AutoLISP memory usage. The first line of this statistics report contains the following information:The
Number of garbage collection calls since AutoLISP started.
Total time spent collecting garbage (in milliseconds).
LISP objects are allocated in dynamic (heap) memory that is organized in segments and divided into pages. Memory is described under the heading, â€śDynamic Memory Segments Statisticsâ€ť:
Dynamic memory page size (in KB).
Number of pages used.
Number of free (empty) pages.
Largest contiguous area of free pages.
Number of segments allocated.
Internal description of the types of objects allocated in this segment. These include
lisp stacksâ€”LISP internal stacks
bytecode areaâ€”compiled code function modules
CONS memoryâ€”CONS objects
::newâ€”untyped memory requests served using this segment
DM Strâ€”dynamic string bodies
DMxx memoryâ€”all other LISP nodes
bstack bodyâ€”internal structure used for IO operations
The final line in the report lists the minimal segment size and the number of allocated segments. AutoLISP keeps a list of no more than three free segments in order to save system calls for memory requests.
All heap memory is global; that is, all AutoCAD documents share the same heap. This could change in future releases of AutoCAD.
mem does not list all memory requested from the operating system; it lists only those requests served by the AutoLISP Dynamic Memory (DM) subsystem. Some AutoLISP classes do not use DM for memory allocation.Note that
; GC calls: 23; GC run time: 298 ms
Dynamic memory segments statistic:
PgSz Used Free FMCL Segs Type
512 79 48 48 1 lisp stacks
256 3706 423 142 16 bytecode area
4096 320 10 10 22 CONS memory
32 769 1213 1089 1 ::new
4096 168 12 10 12 DM Str
4096 222 4 4 15 DMxx memory
128 4 507 507 1 bstack body
Segment size: 65536, total used: 68, free: 0