X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgc-common.c;h=891d7179cd91039905fffa984329fefc1eeb09a1;hb=f6d13b577869229af003c282eb81d65a4a51c713;hp=861029456d7743eadb0e0c17a519636261a47903;hpb=d2e48d5a1805e3fb98268473a71aff38d8fd9d0b;p=sbcl.git diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c index 8610294..891d717 100644 --- a/src/runtime/gc-common.c +++ b/src/runtime/gc-common.c @@ -99,6 +99,9 @@ lispobj (*transother[256])(lispobj object); int (*sizetab[256])(lispobj *where); struct weak_pointer *weak_pointers; +unsigned long bytes_consed_between_gcs = 12*1024*1024; + + /* * copying objects */ @@ -846,6 +849,26 @@ size_vector(lispobj *where) } static int +scav_vector_nil(lispobj *where, lispobj object) +{ + return 2; +} + +static lispobj +trans_vector_nil(lispobj object) +{ + gc_assert(is_lisp_pointer(object)); + return copy_unboxed_object(object, 2); +} + +static int +size_vector_nil(lispobj *where) +{ + /* Just the header word and the length word */ + return 2; +} + +static int scav_vector_bit(lispobj *where, lispobj object) { struct vector *vector; @@ -1508,6 +1531,7 @@ gc_init_tables(void) scavtab[SIMPLE_ARRAY_WIDETAG] = scav_boxed; scavtab[SIMPLE_STRING_WIDETAG] = scav_string; scavtab[SIMPLE_BIT_VECTOR_WIDETAG] = scav_vector_bit; + scavtab[SIMPLE_ARRAY_NIL_WIDETAG] = scav_vector_nil; scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] = scav_vector_unsigned_byte_2; scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] = @@ -1603,6 +1627,7 @@ gc_init_tables(void) transother[SIMPLE_STRING_WIDETAG] = trans_string; transother[SIMPLE_BIT_VECTOR_WIDETAG] = trans_vector_bit; transother[SIMPLE_VECTOR_WIDETAG] = trans_vector; + transother[SIMPLE_ARRAY_NIL_WIDETAG] = trans_vector_nil; transother[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] = trans_vector_unsigned_byte_2; transother[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] = @@ -1702,6 +1727,7 @@ gc_init_tables(void) sizetab[SIMPLE_STRING_WIDETAG] = size_string; sizetab[SIMPLE_BIT_VECTOR_WIDETAG] = size_vector_bit; sizetab[SIMPLE_VECTOR_WIDETAG] = size_vector; + sizetab[SIMPLE_ARRAY_NIL_WIDETAG] = size_vector_nil; sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] = size_vector_unsigned_byte_2; sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =