Next Previous Up Top Contents Index

8 Storage Management

8.5 Allocation in different generations

Objects that are known to have long life can be allocated directly in a higher generation, by usingallocation-in-gen-num andset-default-generation. Note that both these functions have a global effect, i.e. any object allocated after a call toset-default-generation or within the body ofallocation-in-gen-num is allocated in the specified generation, unless it is explicitly allocated in a different generation. Therefore careless use of these functions may lead to allocation of ephemeral garbage in high generations, which is very inefficient. Conversely, if a long-lasting object is allocated to a low generation, it has to survive several garbage collections before being automatically promoted to the next generation.

Interned symbols (and their symbol names) are treated in a special way, because they are assumed to have a long life. They are allocated in the generation specified bylispworks:*symbol-alloc-gen-num*, which defaults to 2.


LispWorks User Guide - 14 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker