sgen_nursery_allocator_prepare_for_pinning ();
while (start < end) {
- void *obj_to_pin = NULL;
+ GCObject *obj_to_pin = NULL;
size_t obj_to_pin_size = 0;
SgenDescriptor desc;
if (addr >= search_start && (char*)addr < (char*)search_start + obj_size) {
/* This is the object we're looking for. */
- obj_to_pin = search_start;
+ obj_to_pin = (GCObject*)search_start;
obj_to_pin_size = canarified_obj_size;
break;
}
* If this is a dummy array marking the beginning of a nursery
* fragment, we don't pin it.
*/
- if (sgen_client_object_is_array_fill ((GCObject*)obj_to_pin))
+ if (sgen_client_object_is_array_fill (obj_to_pin))
goto next_pin_queue_entry;
/*
* when we can't promote an object because we're out of memory.
*/
void
-sgen_pin_object (void *object, GrayQueue *queue)
+sgen_pin_object (GCObject *object, GrayQueue *queue)
{
/*
* All pinned objects are assumed to have been staged, so we need to stage as well.
size_t i;
for (i = 0; i < fin_queue->next_slot; ++i) {
- void *obj = fin_queue->data [i];
+ GCObject *obj = fin_queue->data [i];
if (!obj)
continue;
SGEN_LOG (5, "Scan of fin ready object: %p (%s)\n", obj, sgen_client_vtable_get_name (SGEN_LOAD_VTABLE (obj)));
* Return TRUE if @obj is ready to be finalized.
*/
static inline gboolean
-sgen_is_object_alive (void *object)
+sgen_is_object_alive (GCObject *object)
{
if (ptr_in_nursery (object))
return sgen_nursery_is_object_alive (object);
gboolean
-sgen_gc_is_object_ready_for_finalization (void *object)
+sgen_gc_is_object_ready_for_finalization (GCObject *object)
{
return !sgen_is_object_alive (object);
}
}
gboolean
-sgen_object_is_live (void *obj)
+sgen_object_is_live (GCObject *obj)
{
return sgen_is_object_alive_and_on_current_collection (obj);
}
/* FIXME: batch to reduce lock contention */
while (sgen_have_pending_finalizers ()) {
- void *obj;
+ GCObject *obj;
LOCK_GC;