mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-18 23:32:17 -08:00
alloc_2.d: fix gc configuration for precise gc
The local variables o and c were lost during the refactor in
bd723748d7, re-add them. Also,
the initialization in init_type_info() got moved to the wrong place in
the same refactor, this needs to be called later on.
The function GC_init_explicit_typing is internal to bdwgc and called
automatically in GC_make_descriptor. Therefore, we don't need to call
it during GC initialization.
This commit is contained in:
parent
0092cbb695
commit
1341b79eca
1 changed files with 6 additions and 5 deletions
|
|
@ -42,7 +42,6 @@ static void ecl_mark_env(struct cl_env_struct *env);
|
|||
# define GBC_BOEHM_OWN_MARKER
|
||||
static int cl_object_kind, cl_object_mark_proc_index;
|
||||
static void **cl_object_free_list;
|
||||
extern void GC_init_explicit_typing(void);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
@ -485,6 +484,10 @@ to_bitmap(void *x, void *y)
|
|||
|
||||
void init_type_info (void)
|
||||
{
|
||||
#ifdef GBC_BOEHM_PRECISE
|
||||
union cl_lispunion o;
|
||||
struct ecl_cons c;
|
||||
#endif
|
||||
int i;
|
||||
#define init_tm(/* cl_type */ type, \
|
||||
/* char* */ name, \
|
||||
|
|
@ -747,7 +750,6 @@ init_alloc(void)
|
|||
{
|
||||
if (alloc_initialized) return;
|
||||
alloc_initialized = TRUE;
|
||||
init_type_info();
|
||||
/*
|
||||
* Garbage collector restrictions: we set up the garbage collector
|
||||
* library to work as follows
|
||||
|
|
@ -772,9 +774,6 @@ init_alloc(void)
|
|||
GC_enable_incremental();
|
||||
}
|
||||
GC_register_displacement(1);
|
||||
#ifdef GBC_BOEHM_PRECISE
|
||||
GC_init_explicit_typing();
|
||||
#endif
|
||||
GC_clear_roots();
|
||||
GC_disable();
|
||||
|
||||
|
|
@ -797,6 +796,8 @@ init_alloc(void)
|
|||
cl_core.safety_region = 0;
|
||||
}
|
||||
|
||||
init_type_info();
|
||||
|
||||
old_GC_push_other_roots = GC_push_other_roots;
|
||||
GC_push_other_roots = stacks_scanner;
|
||||
GC_old_start_callback = GC_get_start_callback();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue