From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: default large-file-warning-threshold (was: Generating the ChangeLog files ...) Date: Sun, 30 Nov 2014 13:50:31 -0800 Organization: UCLA Computer Science Department Message-ID: <547B9127.2080508@cs.ucla.edu> References: <21606.10799.112099.788101@a1i15.kph.uni-mainz.de> <1753218.Ot8JCqssfN@descartes> <546AABCF.8030705@cs.ucla.edu> <9xioico2nm.fsf@fencepost.gnu.org> <83k32s9zm5.fsf@gnu.org> <547A4A1B.9060807@cs.ucla.edu> <20141130101201.3a2625e6@forcix> <547B4285.8070901@cs.ucla.edu> <83wq6c8s47.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1417384274 3343 80.91.229.3 (30 Nov 2014 21:51:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Nov 2014 21:51:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 30 22:51:07 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XvCOZ-0007Br-Ce for ged-emacs-devel@m.gmane.org; Sun, 30 Nov 2014 22:51:07 +0100 Original-Received: from localhost ([::1]:51858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvCOY-0003qQ-Uq for ged-emacs-devel@m.gmane.org; Sun, 30 Nov 2014 16:51:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvCOP-0003qG-DY for emacs-devel@gnu.org; Sun, 30 Nov 2014 16:51:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvCOH-0008Nh-Tb for emacs-devel@gnu.org; Sun, 30 Nov 2014 16:50:57 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:44121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvCO9-0008KO-TY; Sun, 30 Nov 2014 16:50:42 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id ABB1F39E8020; Sun, 30 Nov 2014 13:50:40 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7kptKCBZ0UJx; Sun, 30 Nov 2014 13:50:32 -0800 (PST) Original-Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EE69539E8018; Sun, 30 Nov 2014 13:50:31 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178546 Archived-At: Lars Magne Ingebrigtsen wrote: > Do we have a way to ask the OS how much (physical-ish) RAM it has? We could easily add that, using Gnulib's physmem module. For example, GNU 'sort' uses physmem to calculate an internal buffer size ranging from 1/8 to 3/4 of physical memory, depending on some other factors. Eli Zaretskii wrote: > It could also be a security feature. It's largely a security feature insofar as it avoids denial-of-service problems, and deriving the limit from physical memory capacity helps to avoid these problems too. The 10 MB limit is too small nowadays for typical machines. I regularly run into it and it's a genuine (albeit minor) annoyance. When the 10 MB limit was established back in 2003, machines typically had 64 MiB or so of RAM. Nowadays 8 GiB is closer to being typical and the 10 MB limit is way below the sweet spot for warnings. If we were conservative and warned about files larger than 1/8 of physical memory, my circa-2011 8-GiB work desktop would warn about files larger than 1 GiB, and my circa-2005 512-MiB laptop would warn about files larger than 64 MiB, and both numbers sound about right.