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.devel Subject: Re: MPS: out-of-memory Date: Mon, 08 Jul 2024 22:14:54 +0300 Message-ID: <86v81fzoep.fsf@gnu.org> References: <86a5iu4tiy.fsf@gnu.org> <87msmu1uy5.fsf@gmail.com> <865xtg14hd.fsf@gnu.org> <87o777wxh4.fsf@gmail.com> 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="3166"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, pipcet@protonmail.com, acorallo@gnu.org, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 08 21:16:03 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 1sQtqF-0000ZJ-BN for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Jul 2024 21:16:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQtpF-0006bJ-68; Mon, 08 Jul 2024 15:15:01 -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 1sQtpD-0006bB-Hf for emacs-devel@gnu.org; Mon, 08 Jul 2024 15:14:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQtpD-0001Xx-5z; Mon, 08 Jul 2024 15:14:59 -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=eJZK/bPsTv2B8qSC8E96G4Ogl625nK//dWtP8vIM0tY=; b=BWHU2LLyVVh3HB9TiS7U NwYZj8IErabYHG9C32VBpsWDSIO9jJat6O2tcfABhIe/zI2oLib64wmund4dZS1kFWZ1WyjwwWxqF 7u0LsghMcMDwpwbnunWxDhwXqE9mDu96phlX2+fcKBRyHYCndo87LOA1CnuCqPl5winxCLgOe1yYf cRiQ3UKuN8u6xKquPBrI6+wqIaZk3Eby+9OS6RAn1Y+C/4Es3LTuXUaZk6X6FZq7bM/3yVu8IwIfD h5Y1IF5d0x9AsU2qlnPTfMt7N7nw4YB6A41jkWDf8otzb0or/ELAmqbVkZRXGy7kuBhBFNHqEKxE/ 1HpgLCscS7NsoA==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Mon, 08 Jul 2024 20:31:12 +0200) 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:321548 Archived-At: > From: Gerd Möllmann > Cc: Pip Cet , Eli Zaretskii , > acorallo@gnu.org, emacs-devel@gnu.org > Date: Mon, 08 Jul 2024 20:31:12 +0200 > > Helmut Eller writes: > > > On Mon, Jul 08 2024, Pip Cet wrote: > > > >> If I understood Helmut correctly, he wants a mechanism to avoid > >> thrashing after exceeding the memory limit. Maybe we need a special > >> state for that, in which we stop the GC but continue using our memory > >> while the user quits and goes to buy more RAM? > > > > Mabye there could be a hard and a soft limit. When the soft limit > > is reached, Emacs could ask something like > > > > There's little free memory left. Continue? > > Good idea. If the "good idea" is the message, then once upon a time, when we used gmalloc, we had 75% memory warning. (We still have something similar, but only in some configurations, see malloc_warning and its callers.) The warning would suggest to save the session and exit before it's too late.