Branch: Tag:

2017-11-11

2017-11-11 16:35:01 by Tobias S. Josefowitz <tobij@tobij.de>

GC: Inline markers into datastructures

Initial work is done. This may have worse performance characteristics
for now. Futher work will use the block allocator provided iterator
instead of linked lists to visit all objects and potentially optimize
the memory layout of the marker struct.

167:   #endif      static struct mapping_data empty_data = -  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), 1, 0,0,0,0,0,0, 0, +  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), GC_HEADER_INIT(), 1, 0,0,0,0,0,0, 0,    IF_ELSE_KEYPAIR_LOOP((struct keypair *)&empty_data.hash, 0), {0}};   static struct mapping_data weak_ind_empty_data = -  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), 1, 0,0,0,0,0,0, MAPPING_WEAK_INDICES, +  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), GC_HEADER_INIT(), 1, 0,0,0,0,0,0, MAPPING_WEAK_INDICES,    IF_ELSE_KEYPAIR_LOOP((struct keypair *)&weak_ind_empty_data.hash, 0), {0}};   static struct mapping_data weak_val_empty_data = -  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), 1, 0,0,0,0,0,0, MAPPING_WEAK_VALUES, +  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), GC_HEADER_INIT(), 1, 0,0,0,0,0,0, MAPPING_WEAK_VALUES,    IF_ELSE_KEYPAIR_LOOP((struct keypair *)&weak_val_empty_data.hash, 0), {0}};   static struct mapping_data weak_both_empty_data = -  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), 1, 0,0,0,0,0,0, MAPPING_WEAK, +  { PIKE_CONSTANT_MEMOBJ_INIT(1, T_MAPPING_DATA), GC_HEADER_INIT(), 1, 0,0,0,0,0,0, MAPPING_WEAK,    IF_ELSE_KEYPAIR_LOOP((struct keypair *)&weak_both_empty_data.hash, 0), {0}};      /*
251:    }    }    add_ref(md); +  gc_init_marker(&md->m);    m->data=md;   #ifdef MAPPING_SIZE_DEBUG    m->debug_size = md->size;
684:       nmd=(struct mapping_data *)xalloc(size);    memcpy(nmd, md, size); +  gc_init_marker(&nmd->m);    off=((char *)nmd) - ((char *)md);       RELOC(nmd->free_list);