commit | 32cd46a085ac60f4f8b085e2d65ebfc6100bb8c5 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@suse.de> | Wed Jun 07 13:40:40 2006 +0200 |
committer | Jens Axboe <axboe@suse.de> | Wed Jun 07 13:40:40 2006 +0200 |
tree | 91edfa56cd4dc3289d9213aaead6247538e8892f | |
parent | 22f78b320a8d2ffa32b5736fe754c108a8d21525 [diff] [blame] |
[PATCH] Get closer to FreeBSD compile
diff --git a/os-freebsd.h b/os-freebsd.h index bd6d6d0..31fa010 100644 --- a/os-freebsd.h +++ b/os-freebsd.h
@@ -20,4 +20,14 @@ return 1; } +static inline unsigned long long os_phys_mem(void) +{ + int mib[2] = { CTL_HW, HW_PHYSMEM }; + unsigned long long mem; + size_t len = sizeof(mem); + + sysctl(mib, 2, &mem, &len, NULL, 0); + return mem; +} + #endif