aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c
index dcdbd65d85e..9f5cdd0822e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2015,15 +2015,12 @@ compact_strings ()
2015DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, "", 2015DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, "",
2016 "Return the address of the last byte Emacs has allocated, divided by 1024.\n\ 2016 "Return the address of the last byte Emacs has allocated, divided by 1024.\n\
2017This may be helpful in debugging Emacs's memory usage.\n\ 2017This may be helpful in debugging Emacs's memory usage.\n\
2018If called interactively, print the result in the minibuffer.") 2018The value is divided by 1024 to make sure it will fit in a lisp integer.")
2019 () 2019 ()
2020{ 2020{
2021 Lisp_Object end; 2021 Lisp_Object end;
2022 2022
2023 XSET (end, Lisp_Int, (int) sbrk (0)); 2023 XSET (end, Lisp_Int, (int) sbrk (0) / 1024);
2024
2025 if (! NILP (Finteractive_p))
2026 message ("Memory limit at %dk.", XINT (end));
2027 2024
2028 return end; 2025 return end;
2029} 2026}