ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/memory_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/memory_stats.c (file contents):
Revision 1.22 by ats, Sat Feb 14 00:04:12 2004 UTC vs.
Revision 1.23 by tdb, Mon Feb 16 14:55:32 2004 UTC

# Line 35 | Line 35
35   #include <stdio.h>
36   #include <string.h>
37   #endif
38 < #ifdef FREEBSD
38 > #if defined(FREEBSD) || defined(DFBSD)
39   #include <sys/types.h>
40   #include <sys/sysctl.h>
41   #include <unistd.h>
# Line 62 | Line 62 | mem_stat_t *get_memory_stats(){
62          unsigned long long value;
63          FILE *f;
64   #endif
65 < #ifdef FREEBSD
65 > #if defined(FREEBSD) || defined(DFBSD)
66          int mib[2];
67          u_long physmem;
68          size_t size;
# Line 127 | Line 127 | mem_stat_t *get_memory_stats(){
127          mem_stat.used = mem_stat.total - mem_stat.free;
128   #endif
129  
130 < #ifdef FREEBSD
130 > #if defined(FREEBSD) || defined(DFBSD)
131          /* Returns bytes */
132          mib[0] = CTL_HW;
133          mib[1] = HW_PHYSMEM;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines