diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index 0653f2e0ccc..980085d3292 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -7435,9 +7435,17 @@ DEFUN ("memory-info", Fmemory_info, Smemory_info, 0, 0, 0, | |||
| 7435 | doc: /* Return a list of (TOTAL-RAM FREE-RAM TOTAL-SWAP FREE-SWAP). | 7435 | doc: /* Return a list of (TOTAL-RAM FREE-RAM TOTAL-SWAP FREE-SWAP). |
| 7436 | All values are in Kbytes. If there is no swap space, | 7436 | All values are in Kbytes. If there is no swap space, |
| 7437 | last two values are zero. If the system is not supported | 7437 | last two values are zero. If the system is not supported |
| 7438 | or memory information can't be obtained, return nil. */) | 7438 | or memory information can't be obtained, return nil. |
| 7439 | If `default-directory’ is remote, return memory information of the | ||
| 7440 | respective remote host. */) | ||
| 7439 | (void) | 7441 | (void) |
| 7440 | { | 7442 | { |
| 7443 | Lisp_Object handler | ||
| 7444 | = Ffind_file_name_handler (BVAR (current_buffer, directory), | ||
| 7445 | Qmemory_info); | ||
| 7446 | if (!NILP (handler)) | ||
| 7447 | return call1 (handler, Qmemory_info); | ||
| 7448 | |||
| 7441 | #if defined HAVE_LINUX_SYSINFO | 7449 | #if defined HAVE_LINUX_SYSINFO |
| 7442 | struct sysinfo si; | 7450 | struct sysinfo si; |
| 7443 | uintmax_t units; | 7451 | uintmax_t units; |
| @@ -7859,6 +7867,8 @@ do hash-consing of the objects allocated to pure space. */); | |||
| 7859 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); | 7867 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); |
| 7860 | Vmemory_full = Qnil; | 7868 | Vmemory_full = Qnil; |
| 7861 | 7869 | ||
| 7870 | DEFSYM (Qmemory_info, "memory-info"); | ||
| 7871 | |||
| 7862 | DEFSYM (Qconses, "conses"); | 7872 | DEFSYM (Qconses, "conses"); |
| 7863 | DEFSYM (Qsymbols, "symbols"); | 7873 | DEFSYM (Qsymbols, "symbols"); |
| 7864 | DEFSYM (Qstrings, "strings"); | 7874 | DEFSYM (Qstrings, "strings"); |