mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-10 03:03:47 -08:00
Reduce the set of static roots by allocating the stacks with cl_alloc_atomic(). Ensure that the list of libraries is also marked as atomic, so as to allow garbage collection of FASL files
This commit is contained in:
parent
79eb61f08e
commit
425335f570
4 changed files with 8 additions and 5 deletions
|
|
@ -37,7 +37,7 @@ cl_stack_set_size(cl_index new_size)
|
|||
|
||||
start_critical_section();
|
||||
|
||||
new_stack = (cl_object *)cl_alloc(new_size * sizeof(cl_object));
|
||||
new_stack = (cl_object *)cl_alloc_atomic(new_size * sizeof(cl_object));
|
||||
memcpy(new_stack, cl_env.stack, cl_env.stack_size * sizeof(cl_object));
|
||||
|
||||
#ifdef BOEHM_GBC
|
||||
|
|
|
|||
|
|
@ -76,7 +76,10 @@ ecl_library_open(cl_object filename) {
|
|||
if (libraries->vector.fillp == libraries->vector.dim) {
|
||||
cl_object nvector = cl_alloc_object(t_vector);
|
||||
nvector->vector = libraries->vector;
|
||||
libraries->vector.dim *= 2;
|
||||
if (libraries->vector.dim == 0)
|
||||
libraries->vector.dim = 16;
|
||||
else
|
||||
libraries->vector.dim *= 2;
|
||||
libraries->vector.self.t =
|
||||
cl_alloc_atomic(libraries->vector.dim *
|
||||
sizeof(cl_object));
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ cl_boot(int argc, char **argv)
|
|||
cl_core.gentemp_prefix = make_constant_string("T");
|
||||
cl_core.gentemp_counter = MAKE_FIXNUM(0);
|
||||
|
||||
cl_core.libraries = si_make_vector(@'t', MAKE_FIXNUM(128),
|
||||
cl_core.libraries = si_make_vector(@'t', MAKE_FIXNUM(0),
|
||||
@'nil', MAKE_FIXNUM(0),
|
||||
@'nil', @'nil');
|
||||
|
||||
|
|
|
|||
|
|
@ -403,11 +403,11 @@ init_stacks(int *new_cs_org)
|
|||
cl_index size;
|
||||
|
||||
cl_env.frs_size = size = FRSSIZE + 2*FRSGETA;
|
||||
cl_env.frs_org = (ecl_frame_ptr)cl_alloc(size * sizeof(*cl_env.frs_org));
|
||||
cl_env.frs_org = (ecl_frame_ptr)cl_alloc_atomic(size * sizeof(*cl_env.frs_org));
|
||||
cl_env.frs_top = cl_env.frs_org-1;
|
||||
cl_env.frs_limit = &cl_env.frs_org[size - 2*FRSGETA];
|
||||
cl_env.bds_size = size = BDSSIZE + 2*BDSGETA;
|
||||
cl_env.bds_org = (bds_ptr)cl_alloc(size * sizeof(*cl_env.bds_org));
|
||||
cl_env.bds_org = (bds_ptr)cl_alloc_atomic(size * sizeof(*cl_env.bds_org));
|
||||
cl_env.bds_top = cl_env.bds_org-1;
|
||||
cl_env.bds_limit = &cl_env.bds_org[size - 2*BDSGETA];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue