aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 4a912703c39..77be94d73d1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -53,6 +53,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
53#include <sys/sysinfo.h> 53#include <sys/sysinfo.h>
54#endif 54#endif
55 55
56#ifdef MSDOS
57#include "dosfns.h" /* For dos_memory_info. */
58#endif
59
56#if (defined ENABLE_CHECKING \ 60#if (defined ENABLE_CHECKING \
57 && defined HAVE_VALGRIND_VALGRIND_H \ 61 && defined HAVE_VALGRIND_VALGRIND_H \
58 && !defined USE_VALGRIND) 62 && !defined USE_VALGRIND)
@@ -6900,10 +6904,21 @@ values are zero. If the system is not supported, return nil. */)
6900 (uintmax_t) freeswap / 1024); 6904 (uintmax_t) freeswap / 1024);
6901 else 6905 else
6902 return Qnil; 6906 return Qnil;
6903#else /* not HAVE_LINUX_SYSINFO, not WINDOWSNT */ 6907#elif defined MSDOS
6908 unsigned long totalram, freeram, totalswap, freeswap;
6909
6910 if (dos_memory_info (&totalram, &freeram, &totalswap, &freeswap) == 0)
6911 return list4i ((uintmax_t) totalram / 1024,
6912 (uintmax_t) freeram / 1024,
6913 (uintmax_t) totalswap / 1024,
6914 (uintmax_t) freeswap / 1024);
6915 else
6916 return Qnil;
6917}
6918#else /* not HAVE_LINUX_SYSINFO, not WINDOWSNT, not MSDOS */
6904 /* FIXME: add more systems. */ 6919 /* FIXME: add more systems. */
6905 return Qnil; 6920 return Qnil;
6906#endif /* HAVE_LINUX_SYSINFO */ 6921#endif /* HAVE_LINUX_SYSINFO, not WINDOWSNT, not MSDOS */
6907} 6922}
6908 6923
6909/* Debugging aids. */ 6924/* Debugging aids. */