From 5645d547959780e21fe7c5eff12a0d0ae22702da Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 15 Jun 2018 18:21:10 -0700 Subject: [PATCH 2/2] Obsolete memory-limit * doc/lispref/internals.texi (Garbage Collection): Remove documentation of memory-limit. * etc/NEWS: Say it's obsolete. * lisp/subr.el (memory-limit): Declare that it's obsolete. --- doc/lispref/internals.texi | 7 ------- etc/NEWS | 3 ++- lisp/subr.el | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index faaf26f4f7..e8fe26856c 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -506,13 +506,6 @@ Garbage Collection function @code{memory-limit} provides information on the total amount of memory Emacs is currently using. -@defun memory-limit -This function returns an estimate of the total amount of bytes of -virtual memory that Emacs is currently using, divided by 1024. -You can use this to get a general idea of how your actions affect the -memory usage. -@end defun - @defvar memory-full This variable is @code{t} if Emacs is nearly out of memory for Lisp objects, and @code{nil} otherwise. diff --git a/etc/NEWS b/etc/NEWS index 30409a89b5..a1f853e8cd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -657,7 +657,8 @@ instead of just Microsoft platforms. This fixes a 'get-free-disk-space' bug on OS X 10.8 and later (Bug#28639). +++ -** 'memory-limit' now returns a better estimate of memory consumption. +** The 'memory-limit' function is now obsolete. You can use +the 'vsize' component of (process-attributes (emacs-pid)) instead. +++ ** New macro 'combine-change-calls' arranges to call the change hooks diff --git a/lisp/subr.el b/lisp/subr.el index e4da2b2075..6af32c95bc 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2184,6 +2184,7 @@ process-put (defun memory-limit () "Return an estimate of Emacs virtual memory usage, divided by 1024." + (declare (obsolete process-attributes "27.1")) (or (cdr (assq 'vsize (process-attributes (emacs-pid)))) 0)) -- 2.17.1