linux_misc.c (170152) | linux_misc.c (170170) |
---|---|
1/*- 2 * Copyright (c) 2002 Doug Rabson 3 * Copyright (c) 1994-1995 S�ren Schmidt 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Doug Rabson 3 * Copyright (c) 1994-1995 S�ren Schmidt 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/compat/linux/linux_misc.c 170152 2007-05-31 11:51:53Z kib $"); | 31__FBSDID("$FreeBSD: head/sys/compat/linux/linux_misc.c 170170 2007-05-31 22:52:15Z attilio $"); |
32 33#include "opt_compat.h" 34#include "opt_mac.h" 35 36#include <sys/param.h> 37#include <sys/blist.h> 38#include <sys/fcntl.h> 39#if defined(__i386__) --- 94 unchanged lines hidden (view full) --- 134 sysinfo.uptime = ts.tv_sec; 135 136 /* Use the information from the mib to get our load averages */ 137 for (i = 0; i < 3; i++) 138 sysinfo.loads[i] = averunnable.ldavg[i] * 139 LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale; 140 141 sysinfo.totalram = physmem * PAGE_SIZE; | 32 33#include "opt_compat.h" 34#include "opt_mac.h" 35 36#include <sys/param.h> 37#include <sys/blist.h> 38#include <sys/fcntl.h> 39#if defined(__i386__) --- 94 unchanged lines hidden (view full) --- 134 sysinfo.uptime = ts.tv_sec; 135 136 /* Use the information from the mib to get our load averages */ 137 for (i = 0; i < 3; i++) 138 sysinfo.loads[i] = averunnable.ldavg[i] * 139 LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale; 140 141 sysinfo.totalram = physmem * PAGE_SIZE; |
142 sysinfo.freeram = sysinfo.totalram - VMCNT_GET(wire_count) * PAGE_SIZE; | 142 sysinfo.freeram = sysinfo.totalram - cnt.v_wire_count * PAGE_SIZE; |
143 144 sysinfo.sharedram = 0; 145 mtx_lock(&vm_object_list_mtx); 146 TAILQ_FOREACH(object, &vm_object_list, object_list) 147 if (object->shadow_count > 1) 148 sysinfo.sharedram += object->resident_page_count; 149 mtx_unlock(&vm_object_list_mtx); 150 --- 1564 unchanged lines hidden --- | 143 144 sysinfo.sharedram = 0; 145 mtx_lock(&vm_object_list_mtx); 146 TAILQ_FOREACH(object, &vm_object_list, object_list) 147 if (object->shadow_count > 1) 148 sysinfo.sharedram += object->resident_page_count; 149 mtx_unlock(&vm_object_list_mtx); 150 --- 1564 unchanged lines hidden --- |