Currently, the size of struct vm_map is 68 bytes. By using a bit field for the boolean flags, it can be made fit into a cache line.
* vm/vm_map.h (struct vm_map): Use a bit field for the boolean flags wait_for_space and wiring_required. --- vm/vm_map.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vm/vm_map.h b/vm/vm_map.h index b6bc177..b8103eb 100644 --- a/vm/vm_map.h +++ b/vm/vm_map.h @@ -175,9 +175,12 @@ struct vm_map { vm_map_entry_t hint; /* hint for quick lookups */ decl_simple_lock_data(, hint_lock) /* lock for hint storage */ vm_map_entry_t first_free; /* First free space hint */ - boolean_t wait_for_space; /* Should callers wait + + /* Flags */ + unsigned int wait_for_space:1, /* Should callers wait for space? */ - boolean_t wiring_required;/* All memory wired? */ + /* boolean_t */ wiring_required:1; /* All memory wired? */ + unsigned int timestamp; /* Version number */ }; -- 1.9.2