Allow to allocate contiguous if palign is greater than PAGE_SIZE and it’s still align with the begining of a page. --- vm/vm_user.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/vm/vm_user.c b/vm/vm_user.c index df597267..b3c1f09f 100644 --- a/vm/vm_user.c +++ b/vm/vm_user.c @@ -600,6 +600,9 @@ kern_return_t vm_allocate_contiguous( if ((palign < PAGE_SIZE) && (PAGE_SIZE % palign == 0)) palign = PAGE_SIZE; + if (palign % PAGE_SIZE == 0) + palign = PAGE_SIZE; + /* FIXME */ if (palign != PAGE_SIZE) return KERN_INVALID_ARGUMENT; -- 2.41.0