Mercurial > emacs
comparison src/alloc.c @ 83123:ad01ab3c6f4d
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-301
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-302
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-303
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-304
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-305
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-306
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-307
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-308
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-309
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-310
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-311
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-312
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-313
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-314
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-315
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-316
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-317
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-318
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-319
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-320
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-321
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-322
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-323
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-324
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-163
| author | Karoly Lorentey <lorentey@elte.hu> |
|---|---|
| date | Tue, 18 May 2004 19:12:15 +0000 |
| parents | 1a68e4b22355 57f4a242e8f4 |
| children | 50b9a96c837c |
comparison
equal
deleted
inserted
replaced
| 83122:d895a49cccb9 | 83123:ad01ab3c6f4d |
|---|---|
| 843 /* Put on free list. */ | 843 /* Put on free list. */ |
| 844 ablock->x.next_free = free_ablock; | 844 ablock->x.next_free = free_ablock; |
| 845 free_ablock = ablock; | 845 free_ablock = ablock; |
| 846 /* Update busy count. */ | 846 /* Update busy count. */ |
| 847 ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (long) ABLOCKS_BUSY (abase)); | 847 ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (long) ABLOCKS_BUSY (abase)); |
| 848 | 848 |
| 849 if (2 > (long) ABLOCKS_BUSY (abase)) | 849 if (2 > (long) ABLOCKS_BUSY (abase)) |
| 850 { /* All the blocks are free. */ | 850 { /* All the blocks are free. */ |
| 851 int i = 0, aligned = (long) ABLOCKS_BUSY (abase); | 851 int i = 0, aligned = (long) ABLOCKS_BUSY (abase); |
| 852 struct ablock **tem = &free_ablock; | 852 struct ablock **tem = &free_ablock; |
| 853 struct ablock *atop = &abase->blocks[aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1]; | 853 struct ablock *atop = &abase->blocks[aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1]; |
| 4464 for (; i >= 0; i--) | 4464 for (; i >= 0; i--) |
| 4465 mark_object (backlist->args[i]); | 4465 mark_object (backlist->args[i]); |
| 4466 } | 4466 } |
| 4467 mark_kboards (); | 4467 mark_kboards (); |
| 4468 mark_ttys (); | 4468 mark_ttys (); |
| 4469 | |
| 4470 #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | |
| 4471 mark_stack (); | |
| 4472 #endif | |
| 4473 | |
| 4474 #ifdef USE_GTK | |
| 4475 { | |
| 4476 extern void xg_mark_data (); | |
| 4477 xg_mark_data (); | |
| 4478 } | |
| 4479 #endif | |
| 4469 | 4480 |
| 4470 /* Look thru every buffer's undo list | 4481 /* Look thru every buffer's undo list |
| 4471 for elements that update markers that were not marked, | 4482 for elements that update markers that were not marked, |
| 4472 and delete them. */ | 4483 and delete them. */ |
| 4473 { | 4484 { |
| 4508 | 4519 |
| 4509 nextb = nextb->next; | 4520 nextb = nextb->next; |
| 4510 } | 4521 } |
| 4511 } | 4522 } |
| 4512 | 4523 |
| 4513 #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | |
| 4514 mark_stack (); | |
| 4515 #endif | |
| 4516 | |
| 4517 #ifdef USE_GTK | |
| 4518 { | |
| 4519 extern void xg_mark_data (); | |
| 4520 xg_mark_data (); | |
| 4521 } | |
| 4522 #endif | |
| 4523 | |
| 4524 gc_sweep (); | 4524 gc_sweep (); |
| 4525 | 4525 |
| 4526 /* Clear the mark bits that we set in certain root slots. */ | 4526 /* Clear the mark bits that we set in certain root slots. */ |
| 4527 | 4527 |
| 4528 unmark_byte_stack (); | 4528 unmark_byte_stack (); |
| 4976 } | 4976 } |
| 4977 } | 4977 } |
| 4978 break; | 4978 break; |
| 4979 | 4979 |
| 4980 case Lisp_Misc: | 4980 case Lisp_Misc: |
| 4981 if (XMISCTYPE (obj) == Lisp_Misc_Free) | |
| 4982 { | |
| 4983 /* This is (probably) a freed marker which may still exist on | |
| 4984 a buffer undo list, so accept it here, as check below will | |
| 4985 fail (not live). KFS 2004-05-17 */ | |
| 4986 XMARKER (obj)->gcmarkbit = 1; | |
| 4987 break; | |
| 4988 } | |
| 4981 CHECK_ALLOCATED_AND_LIVE (live_misc_p); | 4989 CHECK_ALLOCATED_AND_LIVE (live_misc_p); |
| 4982 if (XMARKER (obj)->gcmarkbit) | 4990 if (XMARKER (obj)->gcmarkbit) |
| 4983 break; | 4991 break; |
| 4984 XMARKER (obj)->gcmarkbit = 1; | 4992 XMARKER (obj)->gcmarkbit = 1; |
| 4985 switch (XMISCTYPE (obj)) | 4993 switch (XMISCTYPE (obj)) |
