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:08:40 +0300 Message-ID: <86wmlvzop3.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="9193"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, gerd.moellmann@gmail.com, acorallo@gnu.org, emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 08 21:09:43 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 1sQtk7-00027Q-1Q for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Jul 2024 21:09:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQtjC-0004qS-DE; Mon, 08 Jul 2024 15:08:46 -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 1sQtjA-0004q5-KY for emacs-devel@gnu.org; Mon, 08 Jul 2024 15:08:44 -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 1sQtjA-0000Gk-BY; Mon, 08 Jul 2024 15:08:44 -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=JNrEdnNxjtVWyfiKDjWyPoxovqrargtGopLSVZpJJ8A=; b=dkGtTQkYJxHL9ljGx24f muDi0jO8opxLfP+lH6shOIcrk3J1LhvVscXuDJ8fP+SszCYbBPg00lt7dVrcJ6KyO+5LPOycnDWiz H0OhbhipeSjHE4X+1o36ucutxZHeHWHjDo45YeQ75uWwk5gGEKR07jCBfLv3eWecKP0n7Ld23bkt8 1b8asLqp3B72FLj9pY8Vvv1kKkIwhOE8nUMrQ1z2x/vnlHhgqHEPhdLErshLTaQpO9o3udkt7Qqz4 3m6/2UcsvFS3ClXIS3Lo56lnIMUBsHKdvJtD/vorx6GXNW4mS3+aOBxPIb7Zny2HJCf1ZkK1AhA1o hdKAsjPGFXhwOw==; In-Reply-To: <87o777wxh4.fsf@gmail.com> (message from Helmut Eller on Mon, 08 Jul 2024 20:27:19 +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:321547 Archived-At: > From: Helmut Eller > Cc: Gerd Möllmann , Eli > Zaretskii , > acorallo@gnu.org, emacs-devel@gnu.org > Date: Mon, 08 Jul 2024 20:27:19 +0200 > > 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? > > and when the hard limit is reached, it would simply abort. We should always attempt to call shut_down_emacs when we decide to exit due to memory-full situation. If there's not enough memory for that, the abort will happen automagically, but if there's enough memory, the user will be happier.