|
From: | Paul Eggert |
Subject: | Re: default large-file-warning-threshold (was: Generating the ChangeLog files ...) |
Date: | Sun, 30 Nov 2014 13:50:31 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |