HomeFreeBSD

vm_phys: fix seg->end test in alloc_seg_contig

Description

vm_phys: fix seg->end test in alloc_seg_contig

In vm_phys_alloc_seg_contig, in allocating multiple memory blocks for
a huge allocation, ensure that the end of the allocated range does not
exceed the upper segment limit.

Reorder a couple of checks to improve code layout.

Reviewed by: alc
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33870

Details

Provenance
dougmAuthored on Jan 18 2022, 6:32 PM
Reviewer
alc
Differential Revision
D33870: phys_alloc_seg_contig: don't allocate past seg->end
Parents
rGda7fc5c33f9a: freebsd32: Fix layout of struct shmid_kernel32.
Branches
Unknown
Tags
Unknown