From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: Failing to GC killed buffers considered harmful Date: Tue, 31 Mar 2020 14:58:20 +0000 Message-ID: References: <838sjj5jg9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="43155"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Daniel Colascione , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 31 17:07:04 2020 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 1jJITo-000B6g-Rq for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 17:07:04 +0200 Original-Received: from localhost ([::1]:39780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJITn-0007Am-R6 for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 11:07:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56691) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJIM1-00036i-3G for emacs-devel@gnu.org; Tue, 31 Mar 2020 10:59:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJILz-0006Ve-Uh for emacs-devel@gnu.org; Tue, 31 Mar 2020 10:59:00 -0400 Original-Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:39472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJILy-0006UI-08; Tue, 31 Mar 2020 10:58:58 -0400 Original-Received: by mail-ot1-x330.google.com with SMTP id x11so22318296otp.6; Tue, 31 Mar 2020 07:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OLvyWQ47oilns2hzt8hrUnYgvgshBdT53APYWrkYC28=; b=rUpbyTl0R2mFUDRnRUCnB+QYOvz/bacnSZPaZd/pZVhxx27mdkF7FWhgIWfNVbmmGu Z8WVV2gg8JW41FxOiye9Xci38SIkeFMKH3NDYNMYTsFoiByVhqoJ7ByfQnVrvmwBnSwl TmeIZ74ovECZC4+PLMo0D6YFIRzInfPRf6lRI4t3PZDmkMwskTfOlnu5nmoSXvcitJdM Sq5zJ+hlCmUB+sHDybmx/14warY3Ob0pJnis2uTVB5O/0elvmS7h6UNSdQIHYlhkZzEm jI8GW+s17EytdIeXTZIZ/CZ/8yM8hQnz7bGGHo/EO0QE94jeBgHYXgpgSgsZDqeCS3tZ UxWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OLvyWQ47oilns2hzt8hrUnYgvgshBdT53APYWrkYC28=; b=gu83r0DUgBAGL3sXr3SW54gnVm+gho9oOB2jjrYrPnUMbzM+3A71P787fpwmBs00rC AI4gOfqckCWRzfFfjXLQj2CsdD+yt9tERwKAS8p7O5hFPP8SlZS9V5ttwZrLwK80RPzT tbcrFmhnIAzUqZVhiM1uNdK431NbdighAxgUHzuTDYCO15fmNf3ufPXSZOuQXNLy5KES 781/8s3hpoov2bkmSJ9gWwki1OumZgFB3pFI6uEmsmu5EBMcnybo5KIJ2yGroc0Wjc1X tKZdq8qr0Yz+nOIKx+MtlO3Y/xKyXHqNLLMVqO1OyJQKGqZdGmEjGXSLYK9bcqxHqfRI iGIQ== X-Gm-Message-State: ANhLgQ1q4R69cMZHUiHu3WWpIwRkeg83GjvSyQaTjnBgRvczzk0Rrfus +slk+bVNVZCWk09M9x6Qfxhi6N5TV3M/8XY5u3s= X-Google-Smtp-Source: ADFU+vtG8QThAxWNe4bYx35MeTagbJQO8l3pII2m9lmSoKja35tysFO8GU8Lcgul/MIBlZsTFUxChsg3h1EpQcZ3vTg= X-Received: by 2002:a4a:919b:: with SMTP id d27mr8420304ooh.76.1585666736720; Tue, 31 Mar 2020 07:58:56 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::330 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:246105 Archived-At: On Mon, Mar 30, 2020 at 6:32 PM Stefan Monnier wrote: > > FWIW, maybe we should get rid of all_buffers. > > AFAICT the only reason we need it is to unmark the buffers during the > > sweep phase, and we could allocate buffers like any other > > pseudovector instead. I agree that removing all_buffers would be good. > The patch below seems to work. But it changes gcstat definitions (killed buffers are no longer counted towards total_buffers). > The only worrisome part I think is that `live_buffer_holding` allowed > pointers into buffer objects, whereas `live_vector_p` only treats > pointers to the beginning of the object as a valid reference. Uh, I don't see how the second part of that statement is true. Can you explain? > Not sure why buffers would be more likely to have valid pointers into > them (and can't remember discussions about that either), buffer text. > so I assume the > difference was not important (it just happened to be easier to support > that for buffers). Which difference, I still don't understand. Next, it might be nice to have anonymous buffers that are garbage-collected automatically and don't need to be killed. *ducks*