svn commit: r326516 - stable/11/sys/vm

Konstantin Belousov kib at FreeBSD.org
Mon Dec 4 09:47:44 UTC 2017


Author: kib
Date: Mon Dec  4 09:47:42 2017
New Revision: 326516
URL: https://svnweb.freebsd.org/changeset/base/326516

Log:
  MFC r326424:
  Add comment for vm_map_find_min().

Modified:
  stable/11/sys/vm/vm_map.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_map.c
==============================================================================
--- stable/11/sys/vm/vm_map.c	Mon Dec  4 09:46:08 2017	(r326515)
+++ stable/11/sys/vm/vm_map.c	Mon Dec  4 09:47:42 2017	(r326516)
@@ -1556,6 +1556,18 @@ again:
 	return (result);
 }
 
+/*
+ *	vm_map_find_min() is a variant of vm_map_find() that takes an
+ *	additional parameter (min_addr) and treats the given address
+ *	(*addr) differently.  Specifically, it treats *addr as a hint
+ *	and not as the minimum address where the mapping is created.
+ *
+ *	This function works in two phases.  First, it tries to
+ *	allocate above the hint.  If that fails and the hint is
+ *	greater than min_addr, it performs a second pass, replacing
+ *	the hint with min_addr as the minimum address for the
+ *	allocation.
+ */
 int
 vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
     vm_offset_t *addr, vm_size_t length, vm_offset_t min_addr,


More information about the svn-src-all mailing list