summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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:
+*/