summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/uvm/uvm_addr.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/uvm/uvm_addr.c b/sys/uvm/uvm_addr.c
index af33700273b..896aee70a05 100644
--- a/sys/uvm/uvm_addr.c
+++ b/sys/uvm/uvm_addr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_addr.c,v 1.23 2017/01/17 17:19:21 stefan Exp $ */
+/* $OpenBSD: uvm_addr.c,v 1.24 2017/01/23 01:10:10 patrick Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -82,19 +82,6 @@ struct uaddr_pivot_state {
struct uaddr_pivot up_pivots[NUM_PIVOTS];
};
-/*
- * Free space comparison.
- * Compares smaller free-space before larger free-space.
- */
-static inline int
-uvm_mapent_fspace_cmp(const struct vm_map_entry *e1,
- const struct vm_map_entry *e2)
-{
- if (e1->fspace != e2->fspace)
- return (e1->fspace < e2->fspace ? -1 : 1);
- return (e1->start < e2->start ? -1 : e1->start > e2->start);
-}
-
/* Forward declaration (see below). */
extern const struct uvm_addr_functions uaddr_kernel_functions;
struct uvm_addr_state uaddr_kbootstrap;
@@ -1435,6 +1422,19 @@ uaddr_stack_brk_create(vaddr_t minaddr, vaddr_t maxaddr)
#ifndef SMALL_KERNEL
+/*
+ * Free space comparison.
+ * Compares smaller free-space before larger free-space.
+ */
+static inline int
+uvm_mapent_fspace_cmp(const struct vm_map_entry *e1,
+ const struct vm_map_entry *e2)
+{
+ if (e1->fspace != e2->fspace)
+ return (e1->fspace < e2->fspace ? -1 : 1);
+ return (e1->start < e2->start ? -1 : e1->start > e2->start);
+}
+
RBT_GENERATE(uaddr_free_rbtree, vm_map_entry, dfree.rbtree,
uvm_mapent_fspace_cmp);
#endif /* !SMALL_KERNEL */