Mercurial > emacs
comparison src/alloc.c @ 1362:4bea5980f778
* alloc.c (Fmemory_limit): Explain why we divide by 1024.
Don't bother trying to display the size in the minibuffer.
| author | Jim Blandy <jimb@redhat.com> |
|---|---|
| date | Wed, 07 Oct 1992 20:42:40 +0000 |
| parents | ef16e7c0d402 |
| children | 0b98dbec0738 |
comparison
equal
deleted
inserted
replaced
| 1361:a45cf4b36ce9 | 1362:4bea5980f778 |
|---|---|
| 2013 /* Debugging aids. */ | 2013 /* Debugging aids. */ |
| 2014 | 2014 |
| 2015 DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, "", | 2015 DEFUN ("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\ |
| 2017 This may be helpful in debugging Emacs's memory usage.\n\ | 2017 This may be helpful in debugging Emacs's memory usage.\n\ |
| 2018 If called interactively, print the result in the minibuffer.") | 2018 The 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 } |
| 2030 | 2027 |
| 2031 | 2028 |
