From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: George Plymale II Newsgroups: gmane.emacs.devel Subject: Re: Does Emacs return memory to the system on Mac OS X or *BSD? Date: Wed, 10 May 2017 21:39:40 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494466823 17382 195.159.176.226 (11 May 2017 01:40:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 May 2017 01:40:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 11 03:40:17 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8d5U-0004Mc-Hy for ged-emacs-devel@m.gmane.org; Thu, 11 May 2017 03:40:16 +0200 Original-Received: from localhost ([::1]:45446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8d5Z-00018n-Tn for ged-emacs-devel@m.gmane.org; Wed, 10 May 2017 21:40:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8d50-00017I-04 for emacs-devel@gnu.org; Wed, 10 May 2017 21:39:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8d4w-0000pO-R2 for emacs-devel@gnu.org; Wed, 10 May 2017 21:39:46 -0400 Original-Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:36300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8d4w-0000p9-M1 for emacs-devel@gnu.org; Wed, 10 May 2017 21:39:42 -0400 Original-Received: by mail-qt0-x22e.google.com with SMTP id m91so6571479qte.3 for ; Wed, 10 May 2017 18:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=southernohio.net; s=google; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version; bh=jJrY9lXaiwuXBBrEQMjjxMB8RXtPnEJFu9TCod1EPRc=; b=Shg+xoTosRk/Q+RKxJQuauuNnSeRHlIkVRCYDzHstpRVSW++RIzw6fUjG3Mv9sZz0P ulxL64rzxTNXKrqaWh+RYW9651xxte1nhKP/yQq+Vg25OkrTXhiuLionr66qjZkkBx/S BmBnBBeakETgbzcCbss04NWRjDd2V6tLBEl4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=jJrY9lXaiwuXBBrEQMjjxMB8RXtPnEJFu9TCod1EPRc=; b=kYcb7qZHCDs+dcDJR+q4GHH7Kg5PBc+LtBUv5Qln/I7O8jn7fossyGGeGFBiGrtWG0 FR8PQKAAMAnuHLfRM/jBuA2vro3drzjRPOUtQBOe6DnerWQvk3mlrnU+Sszaty2xrFw8 IlRwhYIFmaEtv/teVMRp9WB+77RVYIH8oWdxZBW+176UG0y37dw9QQ1cvvEIUw1hFYk9 s6Jwpg2+D5+F7ZdtFHm23JFZyyERYCQcSVXSvnZAcisGPiqflUVTsswnJ13tRXGcWtHW 80t2IaU7P1A+INDGB4hAcM4Htwd7HgrCg6m28xRRAgwLo6OZmgrRI2+wFgWrSRVL4GLN ObFQ== X-Gm-Message-State: AODbwcDnDjnRkhYPqY3tkTgw9jssf/G8thG3c2mBpsf5x2Po7KgZ2pbw 9H5P4PcpMu2FIA== X-Received: by 10.200.47.210 with SMTP id m18mr1474379qta.44.1494466782011; Wed, 10 May 2017 18:39:42 -0700 (PDT) Original-Received: from lehi.dev.orbitalimpact.com (ip-29-210-239-173.east.us.northamericancoax.com. [173.239.210.29]) by smtp.gmail.com with ESMTPSA id t23sm229212qtc.30.2017.05.10.18.39.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 May 2017 18:39:41 -0700 (PDT) In-Reply-To: (message from Stefan Monnier on Wed, 10 May 2017 20:25:01 -0400) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:214785 Archived-At: > IOW, you sometimes see Emacs use an amount of memory you think is too > large, but you have no idea whatsoever why that might be the case Actually, I have monitored which packages, functions, etc. cause Emacs memory usage to spike up and I've monitored how much of that memory is marked as "dead" via the memory-usage package on ELPA. So I do have an idea about why I think some memory seems just a little too large and which things could be causing that. > (IIUC you don't even know if it's really too large or if it causes a > problem) There's rarely ever a problem. It's not "really too large." My only point here was to satisfy my own curiosity about whether or not Emacs gives memory back as Eli originally suggested is possible. It doesn't hurt to have one process use less memory on my system. But I'm not trying to complain about said memory usage (which you seem to think that I'm doing). I was just trying to satisfy a little point of curiosity as Eli suggested could be done here. Don't read too much into my comment: "although I've not seen Emacs exceed 300 MB, which isn't too bad", as I was merely pointing out that I, too, have not had serious memory problems with Emacs, just a curiosity about the situation. > There can be *many* different reasons, beside the fact that some freed > memory is not returned to the OS. Ok, I appreciate that there are different reasons as to why memory usage goes up aside from just not giving stuff back to the OS. I was only wondering if it is possible on the aforementioned systems, to perhaps somewhat mitigate the issue if I ever did have a problem. > More to the point, whether the memory is returned to the OS or not is > usually the least concern on a laptop or desktop machine. Ok, I respect that opinion. As previously said, I understand that such a thing is often not an important factor in real situations. I was just wondering if it happens or can happen on my platforms.