Home | History | Annotate | Download | only in Modules

Lines Matching refs:generation

69    (by "full collection", we mean a collection of the oldest generation).
177 state. The object doesn't live in any generation list, and its
181 The object lives in some generation list, and its tp_traverse is safe to
189 to gc_refs, for each object in the generation being collected.
191 times an object is referenced directly from outside the generation
197 indirectly) from outside the generation into an "unreachable" set.
363 * generation being collected, which can be recognized
421 * generation so we don't care about it, or move_unreachable
595 * weakrefs with callbacks may be moved into the `old` generation. Objects
663 * outside the current generation, CT may be reachable from the
674 * root to this generation, and therefore its callback did too. So
833 * All free lists are cleared during the collection of the highest generation.
872 collect(int generation)
877 PyGC_Head *young; /* the generation we are examining */
878 PyGC_Head *old; /* next older generation */
891 PySys_WriteStderr("gc: collecting generation %d...\n",
892 generation);
893 PySys_WriteStderr("gc: objects in each generation:");
902 if (generation+1 < NUM_GENERATIONS)
903 generation+1].count += 1;
904 for (i = 0; i <= generation; i++)
908 for (i = 0; i < generation; i++) {
909 gc_list_merge(GEN_HEAD(i), GEN_HEAD(generation));
913 young = GEN_HEAD(generation);
914 if (generation < NUM_GENERATIONS-1)
915 old = GEN_HEAD(generation+1);
936 /* Move reachable objects to next generation. */
938 if (generation == NUM_GENERATIONS - 2) {
1018 * generation */
1019 if (generation == NUM_GENERATIONS-1) {
1038 /* Find the oldest generation (highest numbered) where the count
1039 * exceeds the threshold. Objects in the that generation and
1095 "collect([generation]) -> n\n"
1098 "may be an integer specifying which generation to collect. A ValueError\n"
1099 "is raised if the generation number is invalid.\n\n"
1105 static char *keywords[] = {"generation", NULL};
1113 PyErr_SetString(PyExc_ValueError, "invalid generation");