diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-12-03 15:03:30 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-12-03 15:03:30 +0000 |
commit | 974b73e83842d63b14512aa225cc53983a9b5d14 (patch) | |
tree | 462170d38cbb7057e98f08e8c612a9d30eeea0fd /src/alloc.c | |
parent | d0104e754a241cf83811fef30195d41201de533c (diff) | |
parent | f5be22a273892218aad1db32c43ba562a08f3925 (diff) | |
download | emacs-974b73e83842d63b14512aa225cc53983a9b5d14.tar.gz emacs-974b73e83842d63b14512aa225cc53983a9b5d14.tar.bz2 emacs-974b73e83842d63b14512aa225cc53983a9b5d14.zip |
Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned!
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-490
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-491
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-492
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-493
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-494
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-495
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-496
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-497
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-498
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-499
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-500
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-501
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-502
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-503
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-504
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-505
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-506
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-507
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-508
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-509
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-510
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-511
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-512
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-513
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-514
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-515
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-516
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-517
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-518
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-519
Update from CVS: etc/TUTORIAL.cn: Updated.
* emacs@sv.gnu.org/emacs--devo--0--patch-520
Merge from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-521
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-522
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-523
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-524
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-525
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-526
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-527
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-528
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-529
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-530
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-531
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-532
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-533
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-534
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-535
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-161
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-162
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-163
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-164
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-165
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-166
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-167
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-168
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-169
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-170
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-588
Diffstat (limited to 'src/alloc.c')
-rw-r--r-- | src/alloc.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c index 2f186fd3d12..c49d3b5becc 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -480,7 +480,7 @@ static int live_symbol_p P_ ((struct mem_node *, void *)); static int live_float_p P_ ((struct mem_node *, void *)); static int live_misc_p P_ ((struct mem_node *, void *)); static void mark_maybe_object P_ ((Lisp_Object)); -static void mark_memory P_ ((void *, void *)); +static void mark_memory P_ ((void *, void *, int)); static void mem_init P_ ((void)); static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type)); static void mem_insert_fixup P_ ((struct mem_node *)); @@ -4330,11 +4330,13 @@ mark_maybe_pointer (p) } -/* Mark Lisp objects referenced from the address range START..END. */ +/* Mark Lisp objects referenced from the address range START+OFFSET..END + or END+OFFSET..START. */ static void -mark_memory (start, end) +mark_memory (start, end, offset) void *start, *end; + int offset; { Lisp_Object *p; void **pp; @@ -4353,7 +4355,7 @@ mark_memory (start, end) } /* Mark Lisp_Objects. */ - for (p = (Lisp_Object *) start; (void *) p < end; ++p) + for (p = (Lisp_Object *) ((char *) start + offset); (void *) p < end; ++p) mark_maybe_object (*p); /* Mark Lisp data pointed to. This is necessary because, in some @@ -4374,7 +4376,7 @@ mark_memory (start, end) away. The only reference to the life string is through the pointer `s'. */ - for (pp = (void **) start; (void *) pp < end; ++pp) + for (pp = (void **) ((char *) start + offset); (void *) pp < end; ++pp) mark_maybe_pointer (*pp); } @@ -4553,7 +4555,11 @@ static void mark_stack () { int i; - jmp_buf j; + /* jmp_buf may not be aligned enough on darwin-ppc64 */ + union aligned_jmpbuf { + Lisp_Object o; + jmp_buf j; + } j; volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; void *end; @@ -4584,7 +4590,7 @@ mark_stack () } #endif /* GC_SETJMP_WORKS */ - setjmp (j); + setjmp (j.j); end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; #endif /* not GC_SAVE_REGISTERS_ON_STACK */ @@ -4599,7 +4605,7 @@ mark_stack () #endif #endif for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT) - mark_memory ((char *) stack_base + i, end); + mark_memory (stack_base, end, i); /* Allow for marking a secondary stack, like the register stack on the ia64. */ #ifdef GC_MARK_SECONDARY_STACK |