# HG changeset patch # User Richard M. Stallman # Date 873157034 0 # Node ID 81957e8b80e29122e6ac704eed87520b8f3f1e41 # Parent f523227a99ababaf92a9e80f0c475b5e8e3bba3d (free_float, free_cons): Don't use the same field for chaining as for marking. (make_float, Fcons, gc_sweep): Corresponding changes. diff -r f523227a99ab -r 81957e8b80e2 src/alloc.c --- a/src/alloc.c Mon Sep 01 22:44:22 1997 +0000 +++ b/src/alloc.c Mon Sep 01 23:37:14 1997 +0000 @@ -588,7 +588,7 @@ free_float (ptr) struct Lisp_Float *ptr; { - *(struct Lisp_Float **)&ptr->type = float_free_list; + *(struct Lisp_Float **)&ptr->data = float_free_list; float_free_list = ptr; } @@ -600,8 +600,10 @@ if (float_free_list) { + /* We use the data field for chaining the free list + so that we won't use the same field that has the mark bit. */ XSETFLOAT (val, float_free_list); - float_free_list = *(struct Lisp_Float **)&float_free_list->type; + float_free_list = *(struct Lisp_Float **)&float_free_list->data; } else { @@ -668,7 +670,7 @@ free_cons (ptr) struct Lisp_Cons *ptr; { - *(struct Lisp_Cons **)&ptr->car = cons_free_list; + *(struct Lisp_Cons **)&ptr->cdr = cons_free_list; cons_free_list = ptr; } @@ -681,8 +683,10 @@ if (cons_free_list) { + /* We use the cdr for chaining the free list + so that we won't use the same field that has the mark bit. */ XSETCONS (val, cons_free_list); - cons_free_list = *(struct Lisp_Cons **)&cons_free_list->car; + cons_free_list = *(struct Lisp_Cons **)&cons_free_list->cdr; } else { @@ -2134,7 +2138,7 @@ if (!XMARKBIT (cblk->conses[i].car)) { num_free++; - *(struct Lisp_Cons **)&cblk->conses[i].car = cons_free_list; + *(struct Lisp_Cons **)&cblk->conses[i].cdr = cons_free_list; cons_free_list = &cblk->conses[i]; } else @@ -2164,7 +2168,7 @@ if (!XMARKBIT (fblk->floats[i].type)) { num_free++; - *(struct Lisp_Float **)&fblk->floats[i].type = float_free_list; + *(struct Lisp_Float **)&fblk->floats[i].data = float_free_list; float_free_list = &fblk->floats[i]; } else