emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/alloc.c


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/alloc.c
Date: Wed, 07 Aug 2002 10:37:33 -0400

Index: emacs/src/alloc.c
diff -c emacs/src/alloc.c:1.278 emacs/src/alloc.c:1.279
*** emacs/src/alloc.c:1.278     Tue Jul 16 15:47:52 2002
--- emacs/src/alloc.c   Wed Aug  7 10:37:32 2002
***************
*** 4427,4432 ****
--- 4427,4438 ----
  Lisp_Object *last_marked[LAST_MARKED_SIZE];
  int last_marked_index;
  
+ /* For debugging--call abort when we cdr down this many
+    links of a list, in mark_object.  In debugging,
+    the call to abort will hit a breakpoint.
+    Normally this is zero and the check never goes off.  */
+ int mark_object_loop_halt;
+ 
  void
  mark_object (argptr)
       Lisp_Object *argptr;
***************
*** 4437,4442 ****
--- 4443,4449 ----
    void *po;
    struct mem_node *m;
  #endif
+   int cdr_count = 0;
  
   loop:
    obj = *objptr;
***************
*** 4790,4799 ****
--- 4797,4810 ----
        if (EQ (ptr->cdr, Qnil))
          {
            objptr = &ptr->car;
+           cdr_count = 0;
            goto loop;
          }
        mark_object (&ptr->car);
        objptr = &ptr->cdr;
+       cdr_count++;
+       if (cdr_count == mark_object_loop_halt)
+         abort ();
        goto loop;
        }
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]