version 1.5, 2002/07/24 07:46:19 |
version 1.6, 2002/07/24 08:00:10 |
|
|
n_root_sets++; |
n_root_sets++; |
} |
} |
|
|
static roots_were_cleared = FALSE; |
static GC_bool roots_were_cleared = FALSE; |
|
|
void GC_clear_roots GC_PROTO((void)) |
void GC_clear_roots GC_PROTO((void)) |
{ |
{ |
Line 471 ptr_t cold_gc_frame; |
|
Line 471 ptr_t cold_gc_frame; |
|
cold_gc_bs_pointer = bsp - 2048; |
cold_gc_bs_pointer = bsp - 2048; |
if (cold_gc_bs_pointer < BACKING_STORE_BASE) { |
if (cold_gc_bs_pointer < BACKING_STORE_BASE) { |
cold_gc_bs_pointer = BACKING_STORE_BASE; |
cold_gc_bs_pointer = BACKING_STORE_BASE; |
|
} else { |
|
GC_push_all_stack(BACKING_STORE_BASE, cold_gc_bs_pointer); |
} |
} |
GC_push_all_stack(BACKING_STORE_BASE, cold_gc_bs_pointer); |
|
} else { |
} else { |
cold_gc_bs_pointer = BACKING_STORE_BASE; |
cold_gc_bs_pointer = BACKING_STORE_BASE; |
} |
} |
Line 501 void GC_push_gc_structures GC_PROTO((void)) |
|
Line 502 void GC_push_gc_structures GC_PROTO((void)) |
|
# endif |
# endif |
} |
} |
|
|
|
#ifdef THREAD_LOCAL_ALLOC |
|
void GC_mark_thread_local_free_lists(); |
|
#endif |
|
|
/* |
/* |
* Call the mark routines (GC_tl_push for a single pointer, GC_push_conditional |
* Call the mark routines (GC_tl_push for a single pointer, GC_push_conditional |
* on groups of pointers) on every top level accessible pointer. |
* on groups of pointers) on every top level accessible pointer. |
Line 517 ptr_t cold_gc_frame; |
|
Line 522 ptr_t cold_gc_frame; |
|
register int i; |
register int i; |
|
|
/* |
/* |
* push registers - i.e., call GC_push_one(r) for each |
|
* register contents r. |
|
*/ |
|
# ifdef USE_GENERIC_PUSH_REGS |
|
GC_generic_push_regs(cold_gc_frame); |
|
# else |
|
GC_push_regs(); /* usually defined in machine_dep.c */ |
|
# endif |
|
|
|
/* |
|
* Next push static data. This must happen early on, since it's |
* Next push static data. This must happen early on, since it's |
* not robust against mark stack overflow. |
* not robust against mark stack overflow. |
*/ |
*/ |
Line 552 ptr_t cold_gc_frame; |
|
Line 547 ptr_t cold_gc_frame; |
|
GC_push_gc_structures(); |
GC_push_gc_structures(); |
} |
} |
|
|
|
/* Mark thread local free lists, even if their mark */ |
|
/* descriptor excludes the link field. */ |
|
# ifdef THREAD_LOCAL_ALLOC |
|
GC_mark_thread_local_free_lists(); |
|
# endif |
|
|
/* |
/* |
* Now traverse stacks. |
* Now traverse stacks, and mark from register contents. |
|
* These must be done last, since they can legitimately overflow |
|
* the mark stack. |
*/ |
*/ |
# if !defined(USE_GENERIC_PUSH_REGS) |
# ifdef USE_GENERIC_PUSH_REGS |
|
GC_generic_push_regs(cold_gc_frame); |
|
/* Also pushes stack, so that we catch callee-save registers */ |
|
/* saved inside the GC_push_regs frame. */ |
|
# else |
|
/* |
|
* push registers - i.e., call GC_push_one(r) for each |
|
* register contents r. |
|
*/ |
|
GC_push_regs(); /* usually defined in machine_dep.c */ |
GC_push_current_stack(cold_gc_frame); |
GC_push_current_stack(cold_gc_frame); |
/* IN the threads case, this only pushes collector frames. */ |
/* In the threads case, this only pushes collector frames. */ |
/* In the USE_GENERIC_PUSH_REGS case, this is done inside */ |
/* In the case of linux threads on IA64, the hot section of */ |
/* GC_push_regs, so that we catch callee-save registers saved */ |
|
/* inside the GC_push_regs frame. */ |
|
/* In the case of linux threads on Ia64, the hot section of */ |
|
/* the main stack is marked here, but the register stack */ |
/* the main stack is marked here, but the register stack */ |
/* backing store is handled in the threads-specific code. */ |
/* backing store is handled in the threads-specific code. */ |
# endif |
# endif |
if (GC_push_other_roots != 0) (*GC_push_other_roots)(); |
if (GC_push_other_roots != 0) (*GC_push_other_roots)(); |
/* In the threads case, this also pushes thread stacks. */ |
/* In the threads case, this also pushes thread stacks. */ |
|
/* Note that without interior pointer recognition lots */ |
|
/* of stuff may have been pushed already, and this */ |
|
/* should be careful about mark stack overflows. */ |
} |
} |
|
|