From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54698: non-recursive GC marking [PATCH] Date: Mon, 04 Apr 2022 15:25:07 +0300 Message-ID: <83y20ldoik.fsf@gnu.org> References: <5A577100-75CE-4C9E-A7DA-02B917662AF5@acm.org> <8735itglid.fsf@gnus.org> <8527E407-8190-4574-B8D5-BE68220AE663@acm.org> <834k39f58b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 54698@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 04 14:28:06 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nbLoU-0005bQ-Cg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Apr 2022 14:28:06 +0200 Original-Received: from localhost ([::1]:44382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbLoS-0006BF-Vc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Apr 2022 08:28:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbLmV-0004O2-AP for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2022 08:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbLmU-0006hP-GO for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2022 08:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbLmU-0002jS-D3 for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2022 08:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Apr 2022 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54698 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54698-submit@debbugs.gnu.org id=B54698.164907511410428 (code B ref 54698); Mon, 04 Apr 2022 12:26:02 +0000 Original-Received: (at 54698) by debbugs.gnu.org; 4 Apr 2022 12:25:14 +0000 Original-Received: from localhost ([127.0.0.1]:50741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbLli-0002i8-35 for submit@debbugs.gnu.org; Mon, 04 Apr 2022 08:25:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbLlg-0002hq-Vi for 54698@debbugs.gnu.org; Mon, 04 Apr 2022 08:25:13 -0400 Original-Received: from [2001:470:142:3::e] (port=59422 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbLlb-0006R3-IQ; Mon, 04 Apr 2022 08:25:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Z0K83FM84Q4QOxf8zr5HDn2hoeiV4s70wVOhMbSBssw=; b=i7POq6J11ZSQeYS9UBvR c1+9yIEsJFeFrtKJpMOXPDiQRfj/svGbCBiqklRUJJDedF/6HbDuhDc8BA/gZY4lgK4VbKSn3wJEF ejhNARJA0a1PfuWFDwQz+K3fhThRtHMzp5gJ3LEHdr47KP8juDKp+ba7yD1zjoYB0dl3FIH/3gJQt lV6d34y1Uf+KlrnMvZkaMA2yxxs7yC1cBIpsgeGZTPqRsVtK/gKl5+sD70qw0YjkJf4UFE4k70l42 6R71AQrti4yNoyEfoUuli4le+p0vp/oD10R2JHl3rAC0qz3iklPBa8ROhCnd4KbCcleKKC33/fNfj Hcln6P8Oq/sXVw==; Original-Received: from [87.69.77.57] (port=4832 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbLlZ-0007KH-E2; Mon, 04 Apr 2022 08:25:07 -0400 In-Reply-To: (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Mon, 4 Apr 2022 13:57:54 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229406 Archived-At: > Feedback-ID:mattiase@acm.or > From: Mattias EngdegÄrd > Date: Mon, 4 Apr 2022 13:57:54 +0200 > Cc: larsi@gnus.org, 54698@debbugs.gnu.org > > 4 apr. 2022 kl. 13.38 skrev Eli Zaretskii : > > > What happens with data that GC relocates, like when it relocates and > > compacts string data? If the relocated data is allocated on the heap > > after the simulated stack, the original string data, which is now free > > memory, will be "trapped" behind the simulated stack, and 'free' will > > be unable to return it to the OS. This could make the memory > > footprint of Emacs larger than it could be. > > That effect is unlikely to be visible. I don't think a single (and not very big) allocation would contribute materially to heap fragmentation, given the amount of allocation being made all the time. (But prove me wrong!) I don't need to prove you wrong: if the problem is real, we will hear about that soon enough. In principle, even a small allocation can prevent a large free portion of the arena from being returned to the OS. And Lisp strings nowadays tend to be a legion and some quite large in some applications, because many packages abuse them (instead of using temporary buffers).