section->size = MAJOR_SECTION_SIZE - SGEN_SIZEOF_GC_MEM_SECTION;
section->end_data = section->data + section->size;
sgen_update_heap_boundaries ((mword)section->data, (mword)section->end_data);
- DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %ld\n", section->data, section->end_data, mono_gc_get_heap_size ()));
+ DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %lld\n", section->data, section->end_data, (long long int)mono_gc_get_heap_size ()));
scan_starts = (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE;
section->scan_starts = sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS);
section->num_scan_start = scan_starts;
return p;
}
-#define pin_major_object sgen_pin_object
+static inline void
+pin_major_object (char *obj, SgenGrayQueue *queue)
+{
+ sgen_pin_object (obj, queue);
+}
#include "sgen-major-copy-object.h"
if (G_UNLIKELY (objsize > SGEN_MAX_SMALL_OBJ_SIZE || obj_is_from_pinned_alloc (obj))) {
if (SGEN_OBJECT_IS_PINNED (obj))
return;
- DEBUG (9, fprintf (gc_debug_file, " (marked LOS/Pinned %p (%s), size: %zd)\n", obj, sgen_safe_name (obj), objsize));
+ DEBUG (9, fprintf (gc_debug_file, " (marked LOS/Pinned %p (%s), size: %td)\n", obj, sgen_safe_name (obj), objsize));
binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), sgen_safe_object_get_size ((MonoObject*)obj));
SGEN_PIN_OBJECT (obj);
GRAY_OBJECT_ENQUEUE (queue, obj);
collector->free_non_pinned_object = major_free_non_pinned_object;
collector->find_pin_queue_start_ends = major_find_pin_queue_start_ends;
collector->pin_objects = major_pin_objects;
+ collector->pin_major_object = pin_major_object;
collector->init_to_space = major_init_to_space;
collector->sweep = major_sweep;
collector->check_scan_starts = major_check_scan_starts;
collector->print_gc_param_usage = NULL;
collector->major_ops.copy_or_mark_object = major_copy_or_mark_object;
- FILL_COLLECTOR_COPY_OBJECT (collector);
- FILL_COLLECTOR_SCAN_OBJECT (collector);
+ collector->major_ops.scan_object = major_scan_object;
}
#endif