Lines Matching refs:PyGC_Head

72 #define AS_GC(o) ((PyGC_Head *)(((char *)(o))-sizeof(PyGC_Head)))
75 #define FROM_GC(g) ((PyObject *)(((char *)(g))+sizeof(PyGC_Head)))
78 gc_is_collecting(PyGC_Head *g)
84 gc_clear_collecting(PyGC_Head *g)
90 gc_get_refs(PyGC_Head *g)
96 gc_set_refs(PyGC_Head *g, Py_ssize_t refs)
103 gc_reset_refs(PyGC_Head *g, Py_ssize_t refs)
111 gc_decref(PyGC_Head *g)
232 gc_list_init(PyGC_Head *list)
241 gc_list_is_empty(PyGC_Head *list)
248 gc_list_append(PyGC_Head *node, PyGC_Head *list)
250 PyGC_Head *last = (PyGC_Head *)list->_gc_prev;
263 gc_list_remove(PyGC_Head *node)
265 PyGC_Head *prev = GC_PREV(node);
266 PyGC_Head *next = GC_NEXT(node);
279 gc_list_move(PyGC_Head *node, PyGC_Head *list)
282 PyGC_Head *from_prev = GC_PREV(node);
283 PyGC_Head *from_next = GC_NEXT(node);
289 PyGC_Head *to_prev = (PyGC_Head*)list->_gc_prev;
298 gc_list_merge(PyGC_Head *from, PyGC_Head *to)
302 PyGC_Head *to_tail = GC_PREV(to);
303 PyGC_Head *from_head = GC_NEXT(from);
304 PyGC_Head *from_tail = GC_PREV(from);
318 gc_list_size(PyGC_Head *list)
320 PyGC_Head *gc;
330 gc_list_clear_collecting(PyGC_Head *collectable)
332 PyGC_Head *gc;
342 append_objects(PyObject *py_list, PyGC_Head *gc_list)
344 PyGC_Head *gc;
373 validate_list(PyGC_Head *head, enum flagstates flags)
394 PyGC_Head *prev = head;
395 PyGC_Head *gc = GC_NEXT(head);
397 PyGC_Head *trueprev = GC_PREV(gc);
398 PyGC_Head *truenext = (PyGC_Head *)(gc->_gc_next & ~NEXT_MASK_UNREACHABLE);
419 update_refs(PyGC_Head *containers)
421 PyGC_Head *gc = GC_NEXT(containers);
453 PyGC_Head *gc = AS_GC(op);
471 subtract_refs(PyGC_Head *containers)
474 PyGC_Head *gc = GC_NEXT(containers);
486 visit_reachable(PyObject *op, PyGC_Head *reachable)
492 PyGC_Head *gc = AS_GC(op);
515 PyGC_Head *prev = GC_PREV(gc);
516 PyGC_Head *next = (PyGC_Head*)(gc->_gc_next & ~NEXT_MASK_UNREACHABLE);
558 move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
561 PyGC_Head *prev = young;
562 PyGC_Head *gc = GC_NEXT(young);
612 PyGC_Head *last = GC_PREV(unreachable);
623 gc = (PyGC_Head*)prev->_gc_next;
632 untrack_tuples(PyGC_Head *head)
634 PyGC_Head *next, *gc = GC_NEXT(head);
647 untrack_dicts(PyGC_Head *head)
649 PyGC_Head *next, *gc = GC_NEXT(head);
673 move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
675 PyGC_Head *gc, *next;
686 next = (PyGC_Head*)gc->_gc_next;
696 clear_unreachable_mask(PyGC_Head *unreachable)
701 PyGC_Head *gc, *next;
706 next = (PyGC_Head*)gc->_gc_next;
713 visit_move(PyObject *op, PyGC_Head *tolist)
716 PyGC_Head *gc = AS_GC(op);
729 move_legacy_finalizer_reachable(PyGC_Head *finalizers)
732 PyGC_Head *gc = GC_NEXT(finalizers);
754 handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
756 PyGC_Head *gc;
759 PyGC_Head wrcb_to_call; /* weakrefs with callbacks to call */
760 PyGC_Head *next;
806 PyGC_Head *wrasgc; /* AS_GC(wr) */
875 gc = (PyGC_Head*)wrcb_to_call._gc_next;
930 PyGC_Head *finalizers, PyGC_Head *old)
935 PyGC_Head *gc = GC_NEXT(finalizers);
955 finalize_garbage(PyThreadState *tstate, PyGC_Head *collectable)
958 PyGC_Head seen;
971 PyGC_Head *gc = GC_NEXT(collectable);
992 PyGC_Head *collectable, PyGC_Head *old)
997 PyGC_Head *gc = GC_NEXT(collectable);
1092 deduce_unreachable(PyGC_Head *base, PyGC_Head *unreachable) {
1157 handle_resurrected_objects(PyGC_Head *unreachable, PyGC_Head* still_unreachable,
1158 PyGC_Head *old_generation)
1167 PyGC_Head* resurrected = unreachable;
1185 PyGC_Head *young; /* the generation we are examining */
1186 PyGC_Head *old; /* next older generation */
1187 PyGC_Head unreachable; /* non-problematic unreachable trash */
1188 PyGC_Head finalizers; /* objects with, & reachable from, __del__ */
1189 PyGC_Head *gc;
1279 PyGC_Head final_unreachable;
1652 gc_referrers_for(PyObject *objs, PyGC_Head *list, PyObject *resultlist)
1654 PyGC_Head *gc;
2154 gc_fini_untrack(PyGC_Head *list)
2156 PyGC_Head *gc;
2181 // or the next object of the PyGC_Head structure became a dangling
2184 PyGC_Head *gen = GEN_HEAD(gcstate, i);
2192 _PyGC_Dump(PyGC_Head *g)
2255 PyGC_Head *g = AS_GC(op);
2331 if (basicsize > PY_SSIZE_T_MAX - sizeof(PyGC_Head)) {
2335 PyGC_Head *g = AS_GC(op);
2336 g = (PyGC_Head *)PyObject_Realloc(g, sizeof(PyGC_Head) + basicsize);
2348 PyGC_Head *g = AS_GC(op);