Home | History | Annotate | Download | only in Modules

Lines Matching refs:garbage

3   Reference Cycle Garbage Collection
65 static PyObject *garbage = NULL;
89 To limit the cost of garbage collection, there are two strategies;
113 thusly: "each full garbage collection is more and more costly as the
125 so do not need to be tracked by the garbage collector. Untracking these
126 objects reduces the cost of garbage collections. However, determining
128 weighed against the benefits for garbage collection.
133 ii) When the container is examined by the garbage collector.
138 not survive until garbage collection. It is therefore not worthwhile
142 During garbage collection it is determined whether any surviving tuples
144 already not tracked. Tuples are examined for untracking in all garbage
150 becomes tracked. During a full garbage collection (all generations),
155 the CURRENT tracking status of the object. Subsequent garbage
166 #define DEBUG_SAVEALL (1<<5) /* save all garbage in gc.garbage */
178 /* total number of uncollectable objects (put into gc.garbage) */
748 /* Handle uncollectable garbage (cycles with tp_del slots, and stuff reachable
751 * garbage list (a Python list), else only the objects in finalizers with
752 * __del__ methods are appended to garbage. All objects in finalizers are
754 * Returns 0 if all OK, <0 on error (out of memory to grow the garbage list).
762 if (garbage == NULL) {
763 garbage = PyList_New(0);
764 if (garbage == NULL)
765 Py_FatalError("gc couldn't create gc.garbage list");
771 if (PyList_Append(garbage, op) < 0)
862 PyList_Append(garbage, op);
1045 * reachable list of garbage. The programmer has to deal with
1062 gc_str = PyUnicode_FromString("garbage collection");
1064 Py_FatalError("unexpected exception during garbage collection");
1083 /* Invoke progress callbacks to notify clients that garbage collection
1120 /* Perform garbage collection of a generation and invoke
1161 "Enable automatic garbage collection.\n");
1174 "Disable automatic garbage collection.\n");
1187 "Returns true if automatic garbage collection is enabled.\n");
1232 "Set the garbage collection debugging flags. Debugging information is\n"
1240 " DEBUG_SAVEALL - Save objects to gc.garbage rather than freeing them.\n"
1256 "Get the garbage collection debugging flags.\n");
1475 "Returns true if the object is tracked by the garbage collector.\n"
1494 "This module provides access to the garbage collector for reference cycles.\n"
1496 "enable() -- Enable automatic garbage collection.\n"
1497 "disable() -- Disable automatic garbage collection.\n"
1554 if (garbage == NULL) {
1555 garbage = PyList_New(0);
1556 if (garbage == NULL)
1559 Py_INCREF(garbage);
1560 if (PyModule_AddObject(m, "garbage", garbage) < 0)
1615 threads, a daemon thread can start a cyclic garbage collection
1633 && garbage != NULL && PyList_GET_SIZE(garbage) > 0) {
1646 PyList_GET_SIZE(garbage)))
1650 repr = PyObject_Repr(garbage);
1652 PyErr_WriteUnraisable(garbage);