Algorithm - version 2 Decouple allocator algorithm from virtual memory management. struct uvm_addr_functions { int (*uaddr_select) (map, state, addr_out, entry_out, sz, align, offset, prot, hint); void (*uaddr_free_insert) (map, state, entry); void (*uaddr_free_remove) (map, state, entry); void (*uaddr_destroy) (state); }; struct uvm_addr_state { vaddr_t uaddr_minaddr; vaddr_t uaddr_maxaddr; struct uvm_addr_functions *uaddr_functions; };