From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: warn-maybe-out-of-memory Date: Sun, 13 Jul 2014 11:01:44 +0400 Message-ID: <53C22ED8.5050206@yandex.ru> References: <83egxtax97.fsf@gnu.org> <83d2ddaw52.fsf@gnu.org> <53BF6B2F.5030701@yandex.ru> <837g3kbd9g.fsf@gnu.org> <53BFA3BB.6090709@yandex.ru> <8361j4b744.fsf@gnu.org> <53BFB1C3.9020202@yandex.ru> <5kpphafqd9.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1405234945 22001 80.91.229.3 (13 Jul 2014 07:02:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jul 2014 07:02:25 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 13 09:02:19 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 1X6Dnd-0005Im-6K for ged-emacs-devel@m.gmane.org; Sun, 13 Jul 2014 09:02:17 +0200 Original-Received: from localhost ([::1]:51336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6Dnc-00013b-6A for ged-emacs-devel@m.gmane.org; Sun, 13 Jul 2014 03:02:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6DnT-00012Y-P7 for emacs-devel@gnu.org; Sun, 13 Jul 2014 03:02:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6DnN-0004iH-GK for emacs-devel@gnu.org; Sun, 13 Jul 2014 03:02:07 -0400 Original-Received: from forward6l.mail.yandex.net ([84.201.143.139]:49126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6DnG-0004ay-K3; Sun, 13 Jul 2014 03:01:54 -0400 Original-Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward6l.mail.yandex.net (Yandex) with ESMTP id 28B0A14E1116; Sun, 13 Jul 2014 11:01:49 +0400 (MSK) Original-Received: from smtp2h.mail.yandex.net (localhost [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 5DDE21704634; Sun, 13 Jul 2014 11:01:48 +0400 (MSK) Original-Received: from 143.gprs.mts.ru (143.gprs.mts.ru [213.87.128.143]) by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id XCMsfFpWmm-1llqi44d; Sun, 13 Jul 2014 11:01:47 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 2f6a8fbb-7324-41b1-95c2-509a5a501b1c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1405234907; bh=dr6QrBFtagGWlJGmsOLOClJ5Ld9lkUqQakpTVdVu/fI=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=KS5Kv7t8d/JG0YJnVThN7IjygRtMItBHNiqWn6ENDUm/TbmyAS5i5eSF+7ME8+Hy+ tvzv4WiGIVb7lR98QWQpNESYWzSyd3exUApVHmjhEaY89ELHuJeas9qbWZIodln0YJ sW5avBMDV0nhaT//yRIhkN1l6NhRI40Elyf6mZNo= Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <5kpphafqd9.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.139 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:173009 Archived-At: On 07/12/2014 09:17 PM, Glenn Morris wrote: >> Here's another problem: what kind of "free memory" do you measure? "Free" means "immediately available for allocation", i.e. not used by OS or other processes for any purpose. If an OS should perform some non-trivial action to get more memory (increase swap space or shrink some internal data structures), this is not accounted as "free". > I'd also like to know. If it really is the 8G amount in the example > above, then as you say that seems just plain wrong for Emacs to warn > about. In the example above, I asked for 10G having just 8G free. In that example, OS was able to shrink page cache by 2GB and satisfy the request; but we can't assume that OS succeeds with this each time we ask to allocate a lot of memory. > Because who is opening a file with Emacs that matches the > amount of RAM on their machine? This is not uncommon editing task: as Google reports, users asks this question after unsuccessful attempts to use their standard/favorite editors. For example: http://askubuntu.com/questions/28847/text-editor-to-edit-4-3-gb-plain-text-file. > The performance of Emacs is pretty poor with large files - the default > large-file-warning-threshold is 10MB! This may be subject to change without notice :-). Dmitry