unsigned char *free_chunk_map;
};
+/* We allow read only access on the list while sweep is not running */
LOSObject *los_object_list = NULL;
mword los_memory_usage = 0;
los_segment_index += size + sizeof (LOSObject);
g_assert (los_segment_index <= LOS_SEGMENT_SIZE);
#else
- sgen_ensure_free_space (size);
+ sgen_ensure_free_space (size, GENERATION_OLD);
#ifdef USE_MALLOC
obj = malloc (size + sizeof (LOSObject));
*vtslot = vtable;
sgen_update_heap_boundaries ((mword)obj->data, (mword)obj->data + size);
obj->next = los_object_list;
+ /*
+ * We need a memory barrier so we don't expose as head of the los object list
+ * a LOSObject that doesn't have its fields initialized.
+ */
+ mono_memory_write_barrier ();
los_object_list = obj;
los_memory_usage += size;
los_num_objects++;
{
LOSObject *obj;
+ binary_protocol_los_card_table_scan_start (sgen_timestamp (), mod_union);
for (obj = los_object_list; obj; obj = obj->next) {
guint8 *cards;
sgen_cardtable_scan_object (obj->data, sgen_los_object_size (obj), cards, mod_union, ctx);
}
+ binary_protocol_los_card_table_scan_end (sgen_timestamp (), mod_union);
}
void