comparison src/alloc.c @ 42403:6643f205d5db

Add a comment.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 29 Dec 2001 12:47:29 +0000
parents a4794d1dada1
children 0ab7a9a5666c
comparison
equal deleted inserted replaced
42402:78c492054239 42403:6643f205d5db
2708 /************************************************************************ 2708 /************************************************************************
2709 C Stack Marking 2709 C Stack Marking
2710 ************************************************************************/ 2710 ************************************************************************/
2711 2711
2712 #if GC_MARK_STACK || defined GC_MALLOC_CHECK 2712 #if GC_MARK_STACK || defined GC_MALLOC_CHECK
2713
2714 /* Conservative C stack marking requires a method to identify possibly
2715 live Lisp objects given a pointer value. We do this by keeping
2716 track of blocks of Lisp data that are allocated in a red-black tree
2717 (see also the comment of mem_node which is the type of nodes in
2718 that tree). Function lisp_malloc adds information for an allocated
2719 block to the red-black tree with calls to mem_insert, and function
2720 lisp_free removes it with mem_delete. Functions live_string_p etc
2721 call mem_find to lookup information about a given pointer in the
2722 tree, and use that to determine if the pointer points to a Lisp
2723 object or not. */
2713 2724
2714 /* Initialize this part of alloc.c. */ 2725 /* Initialize this part of alloc.c. */
2715 2726
2716 static void 2727 static void
2717 mem_init () 2728 mem_init ()