[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8734d60b05: Improve documentation of 'malloc-trim'
From: |
Eli Zaretskii |
Subject: |
master 8734d60b05: Improve documentation of 'malloc-trim' |
Date: |
Sun, 1 May 2022 06:07:29 -0400 (EDT) |
branch: master
commit 8734d60b053852a6cf4dca59da4c5876820fa7d2
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Improve documentation of 'malloc-trim'
* src/alloc.c (Fmalloc_trim): Fix the doc string.
* etc/NEWS: Document which systems support 'malloc-trim'.
---
etc/NEWS | 3 ++-
src/alloc.c | 8 ++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 371fbc2145..fc7432669c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1547,7 +1547,8 @@ functions.
---
** New function 'malloc-trim'.
This function allows returning unused memory back to the operating
-system, and is mainly meant as a debugging tool.
+system, and is mainly meant as a debugging tool. It is currently
+available only when Emacs was built with glibc as the C library.
---
** 'x-show-tip' no longer hard-codes a timeout default.
diff --git a/src/alloc.c b/src/alloc.c
index 661f37dd5c..43fbbb79be 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7481,14 +7481,14 @@ arenas. */)
#ifdef HAVE_MALLOC_TRIM
DEFUN ("malloc-trim", Fmalloc_trim, Smalloc_trim, 0, 1, "",
- doc: /* Release free memory from the heap.
-This function asks libc to return unused memory back to the operating
+ doc: /* Release free heap memory to the OS.
+This function asks libc to return unused heap memory back to the operating
system. This function isn't guaranteed to do anything, and is mainly
meant as a debugging tool.
If LEAVE_PADDING is given, ask the system to leave that much unused
-spaced in the heap. This should be an integer, and if not given,
-defaults to 0.
+space in the heap of the Emacs process. This should be an integer, and if
+not given, it defaults to 0.
This function returns nil if no memory could be returned to the
system, and non-nil if some memory could be returned. */)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8734d60b05: Improve documentation of 'malloc-trim',
Eli Zaretskii <=