From edebe3b8a33eb989d593f05d5442220a10c7a0cb Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 23 Feb 2021 11:22:20 +0000 Subject: [PATCH] remove unused uvm_mapent_bias() ok mpi@ --- sys/uvm/uvm_map.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 931504a7417..a9661fb6421 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.270 2021/01/19 13:21:36 mpi Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.271 2021/02/23 11:22:20 jsg Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -183,7 +183,6 @@ void uvm_map_splitentry(struct vm_map*, struct vm_map_entry*, struct vm_map_entry*, vaddr_t); vsize_t uvm_map_boundary(struct vm_map*, vaddr_t, vaddr_t); -int uvm_mapent_bias(struct vm_map*, struct vm_map_entry*); /* * uvm_vmspace_fork helper functions. @@ -5377,39 +5376,6 @@ out: return error; } -/* - * Determine allocation bias. - * - * Returns 1 if we should bias to high addresses, -1 for a bias towards low - * addresses, or 0 for no bias. - * The bias mechanism is intended to avoid clashing with brk() and stack - * areas. - */ -int -uvm_mapent_bias(struct vm_map *map, struct vm_map_entry *entry) -{ - vaddr_t start, end; - - start = VMMAP_FREE_START(entry); - end = VMMAP_FREE_END(entry); - - /* Stay at the top of brk() area. */ - if (end >= map->b_start && start < map->b_end) - return 1; - /* Stay at the far end of the stack area. */ - if (end >= map->s_start && start < map->s_end) { -#ifdef MACHINE_STACK_GROWS_UP - return 1; -#else - return -1; -#endif - } - - /* No bias, this area is meant for us. */ - return 0; -} - - boolean_t vm_map_lock_try_ln(struct vm_map *map, char *file, int line) { -- 2.20.1