summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-02-15 09:59:27 +0000
committerJim Meyering <jim@meyering.net>2003-02-15 09:59:27 +0000
commit2b62137426cc3d68ece807b3ffc22635aa5fef77 (patch)
tree56aac1059d36b61f7e229c2c1bd92363be501018 /lib
parentc1604ca5a77e65264022ede42460917b9a87f4de (diff)
downloadcoreutils-2b62137426cc3d68ece807b3ffc22635aa5fef77.tar.xz
(main) [DEBUG]: New function.
Diffstat (limited to 'lib')
-rw-r--r--lib/physmem.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/physmem.c b/lib/physmem.c
index 1706e6c39..f9f72b87e 100644
--- a/lib/physmem.c
+++ b/lib/physmem.c
@@ -136,3 +136,24 @@ physmem_available (void)
/* Guess 25% of physical memory. */
return physmem_total () / 4;
}
+
+
+#if DEBUG
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+ printf ("%12.f %12.f\n", physmem_total (), physmem_available ());
+ exit (0);
+}
+
+#endif /* DEBUG */
+
+/*
+Local Variables:
+compile-command: "gcc -DDEBUG -DHAVE_CONFIG_H -I.. -g -O -Wall -W physmem.c"
+End:
+*/