diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-12-10 19:13:08 -0500 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-12-10 19:13:08 -0500 |
| commit | 2c302df3a13236bfbf8ea1b771d13618fcda8d71 (patch) | |
| tree | f26dc9f22861dc37610de319d05255de058c221b /src/alloc.c | |
| parent | 0c747cb143fa227e78f350ac353d703f489209df (diff) | |
| parent | 175069efeb080517afefdd44a06f7a779ea8c25c (diff) | |
Merge from trunk
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 0f83f375d40..b18fd6feb3d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -351,7 +351,6 @@ enum mem_type static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type); static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); -void refill_memory_reserve (void); #if GC_MARK_STACK || defined GC_MALLOC_CHECK @@ -4043,8 +4042,14 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", static INLINE void mark_maybe_object (Lisp_Object obj) { - void *po = (void *) XPNTR (obj); - struct mem_node *m = mem_find (po); + void *po; + struct mem_node *m; + + if (INTEGERP (obj)) + return; + + po = (void *) XPNTR (obj); + m = mem_find (po); if (m != MEM_NIL) { @@ -5694,13 +5699,14 @@ mark_terminals (void) for (t = terminal_list; t; t = t->next_terminal) { eassert (t->name != NULL); - if (!VECTOR_MARKED_P (t)) - { #ifdef HAVE_WINDOW_SYSTEM - mark_image_cache (t->image_cache); + /* If a terminal object is reachable from a stacpro'ed object, + it might have been marked already. Make sure the image cache + gets marked. */ + mark_image_cache (t->image_cache); #endif /* HAVE_WINDOW_SYSTEM */ - mark_vectorlike ((struct Lisp_Vector *)t); - } + if (!VECTOR_MARKED_P (t)) + mark_vectorlike ((struct Lisp_Vector *)t); } } |
