Add comment for vm_map_find_min().

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
X-Differential revision:	https://reviews.freebsd.org/D13155
This commit is contained in:
Konstantin Belousov 2017-12-01 10:53:08 +00:00
parent 1bf4012c84
commit e8502826ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326424

View file

@ -1558,6 +1558,18 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
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,