From fa21e29ea64f2217db75977eb9017ea22c3633b2 Mon Sep 17 00:00:00 2001 From: Abhinav Upadhyay Date: Thu, 16 May 2024 11:56:50 +0530 Subject: [PATCH 1/2] Move the comment to the right place where it used to be In GH-116206, the comment about moving reachable objects to next generation got moved from its original place to a place where there is no code below it. This PR puts it back where the actual movement of rechable objects happen to the next generation. --- Python/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/gc.c b/Python/gc.c index aa8b216124c36a..1f8c5b1da28c06 100644 --- a/Python/gc.c +++ b/Python/gc.c @@ -1513,12 +1513,13 @@ gc_collect_region(PyThreadState *tstate, if (untrack & UNTRACK_DICTS) { untrack_dicts(from); } + + /* Move reachable objects to next generation. */ validate_consistent_old_space(to); if (from != to) { gc_list_merge(from, to); } validate_consistent_old_space(to); - /* Move reachable objects to next generation. */ /* All objects in unreachable are trash, but objects reachable from * legacy finalizers (e.g. tp_del) can't safely be deleted. From 59e70e0987c53c610ad0eaa20f27e1bd24a960e4 Mon Sep 17 00:00:00 2001 From: Abhinav Upadhyay Date: Thu, 16 May 2024 12:05:10 +0530 Subject: [PATCH 2/2] Remove extra new line to appease lint --- Python/gc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Python/gc.c b/Python/gc.c index 1f8c5b1da28c06..807585deda2241 100644 --- a/Python/gc.c +++ b/Python/gc.c @@ -1513,7 +1513,6 @@ gc_collect_region(PyThreadState *tstate, if (untrack & UNTRACK_DICTS) { untrack_dicts(from); } - /* Move reachable objects to next generation. */ validate_consistent_old_space(to); if (from != to) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy