Next: , Previous: , Up: Allocation of Objects in SXEmacs Lisp   [Contents][Index]

11.9 Cons

Conses are allocated in standard frob blocks. The only thing to note is that conses can be explicitly freed using free_cons() and associated functions free_list() and free_alist(). This immediately puts the conses onto the cons free list, and decrements the statistics on memory allocation appropriately. This is used to good effect by some extremely commonly-used code, to avoid generating extra objects and thereby triggering GC sooner. However, you have to be extremely careful when doing this. If you mess this up, you will get BADLY BURNED, and it has happened before.