HomeFreeBSD

Refactor vm_map_find(), creating a separate function, vm_map_alignspace(),

Description

Refactor vm_map_find(), creating a separate function, vm_map_alignspace(),
for finding aligned free space in the given map. With this change, we
always return KERN_NO_SPACE when we fail to find free space. Whereas,
previously, we might return KERN_INVALID_ADDRESS. Also, with this change,
we explicitly check for address wrap, rather than relying upon the map's
min and max addresses to establish sentinel-like regions.

This refactoring was inspired by the problem that we addressed in r326098.

Reviewed by: kib
Tested by: pho
Discussed with: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D13346

Details

Provenance
alcAuthored on
Reviewer
kib
Differential Revision
D13346: Handle address wrap errors in vm_map_find()
Parents
rS327217: MFC r326480:
Branches
Unknown
Tags
Unknown