-/* $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 $ */
/*
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.
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)
{