* This function aims to determine if the object is mapped, * specifically, if it is referenced by a vm_map_entry. Because * objects occasionally acquire transient references that do not * represent a mapping, the method used here is inexact. However, it * has very low overhead and is good enough for the advisory * vm.vmtotal sysctl. */
| 151 | * vm.vmtotal sysctl. |
| 152 | */ |
| 153 | static bool |
| 154 | is_object_active(vm_object_t obj) |
| 155 | { |
| 156 | |
| 157 | return (obj->ref_count > obj->shadow_count); |
| 158 | } |
| 159 | |
| 160 | #if defined(COMPAT_FREEBSD11) |
| 161 | struct vmtotal11 { |