changeset 19666:81957e8b80e2

(free_float, free_cons): Don't use the same field for chaining as for marking. (make_float, Fcons, gc_sweep): Corresponding changes.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 Sep 1997 23:37:14 +0000
parents f523227a99ab
children 0651874195c7
files src/alloc.c
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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