From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: struct window, prev_buffers + next_buffers Date: Sat, 22 Jun 2024 10:53:57 +0200 Message-ID: References: <861q4pjtn4.fsf@gnu.org> <86y16xiduv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13365"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, eller.helmut@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 22 10:54:56 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sKwWO-0003DS-7Z for ged-emacs-devel@m.gmane-mx.org; Sat, 22 Jun 2024 10:54:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKwVX-000571-HM; Sat, 22 Jun 2024 04:54:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKwVW-00056Y-9n for emacs-devel@gnu.org; Sat, 22 Jun 2024 04:54:02 -0400 Original-Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKwVU-0001Az-PC; Sat, 22 Jun 2024 04:54:02 -0400 Original-Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-57cc1c00ba6so3258041a12.1; Sat, 22 Jun 2024 01:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719046439; x=1719651239; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=McELt9TU1aEBqGrDrh9GA8NmXLuaK9HwYqhpWbZfVJw=; b=jZ58aB0oq3bs5rVQbIHJ5x9NQlQMtw1AjM8hxtrsTA4DYdQMKxNhkWcGpzDVevOvFx B3IyBD5pzTanYzRgAwG1hBPWK6lTLOh4WW5Ih90Raz8Qut0C+fpQqxiqJratBDlRo3Qq XTXVhkSjB8mF61tXAscrMIjDItwkYNGZ1mvvfPZsHg9k1uirDeCnlOXRT47km3VdDrVQ dneGCfKUMZxz8pELYpybfUPos9H/JWvwkx4jsGcCArn8/otvFgozxWYc5Cd4KmdmlxG0 UUCmECCGU9nujcMdkDlx9cUuXdKrARYuGiE+11GgDxbNZEYsnAz941qWrPtfMj4wNPq8 eHCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719046439; x=1719651239; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=McELt9TU1aEBqGrDrh9GA8NmXLuaK9HwYqhpWbZfVJw=; b=Gz16OWxj5e05bD6NZ+rUvqrL2WOl1z6TnHw84ctoJl/Sxsfhbqysvc+nHXVUi4k5qt quAr8kO5oEtCATC3YxIB7AR1U3ZkkAO3q6urTYt4x9Y9ZVpXdARM+Y8QtK0JMI9xPDTm 1WG8K76iL4brZ2YTNdvTkFmZXN7fVp26wdpeFqdDz6SvRFScRJ3UWfxGv1M4A5lciNls xVPvqqpwkbKaM3+gVWwgYsC9Ol/fcXAcqiWanrAB8GCBSekXMffiFGpZPEnqUOgut1m0 naex1e+/lmdNLUBZB25PNZWc/26cp/ZoQSNz4xCpwZ7UfHipAweGggyplVKlFUB9ZLEx VlWw== X-Gm-Message-State: AOJu0YxEDF6ZVUX9q1uJxXu8HQY4+DKWuSsCE0GvTbeUSQJRCTEHTDWz 4Ypv0m97CXn9wN6fgK4MRWhLzDb3AYJyBqBSXHUxAKREkkw6zkiAlazMPw== X-Google-Smtp-Source: AGHT+IE+No/v8edZF5swO4AsaEXYH+ykxkdIalfSBXam4DOZuFyMsqYPq2kmdeqyH/l4njp/2yDamw== X-Received: by 2002:a17:906:aed7:b0:a5a:1562:518c with SMTP id a640c23a62f3a-a6fab77564bmr598456066b.48.1719046438330; Sat, 22 Jun 2024 01:53:58 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e364bf.dip0.t-ipconnect.de. [217.227.100.191]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf560754sm170228566b.161.2024.06.22.01.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 01:53:57 -0700 (PDT) In-Reply-To: <86y16xiduv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Jun 2024 11:24:56 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320463 Archived-At: Eli Zaretskii writes: >> But it won't be GC'd anyway, becuase it's marked. And if the buffer in >> the cons is killed, it remains in the list. That makes no sense to me. > > But the code doesn't GC buffers, it just removes them from the > prev_buffers and next_buffers lists. If a cons cell of the list is > marked, removing the buffer (which could subsequently lead to GC'ing > the buffer) might not be expected by the code which uses data that > references that buffer, even though the buffer is killed. You mean the possible change to the cdr of the cons cell could affect the client? Hm, that could be the reason. Thanks. I think I'll try to let window-{next,prev}-buffers clean the list before returning it. It doesn't look like something to me that a weak vector or something like that could solve. WDYT?