From 0650a4ee30e34ba039940032fdff3719c1b4b000 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 20 Dec 2020 01:41:55 +0100 Subject: vm_map: Fix taking into account high bits in mask glibc's sysdeps/mach/hurd/dl-sysdep.c has been wanting to use this for decades. * include/string.h (ffs): New declaration. * vm/vm_map.c: Include . (vm_map_find_entry_anywhere): Separate out high bits from mask, to compute the maximum offset instead of map->max_offset. * doc/mach.texi (vm_map): Update documentation accordingly. --- doc/mach.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/mach.texi b/doc/mach.texi index 11b0a066..ff15a95a 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -3434,8 +3434,8 @@ exception. @var{address}. If the @var{anywhere} option is used, this address is ignored. The address actually allocated will be returned in @var{address}. @var{size} is the number of bytes to allocate (rounded by -the system in a machine dependent way). The alignment restriction is -specified by @var{mask}. Bits asserted in this mask must not be +the system in a machine dependent way). The alignment and maximum address +restrictions are specified by @var{mask}. Bits asserted in this mask must not be asserted in the address returned. If @var{anywhere} is set, the kernel should find and allocate any region of the specified size, and return the address of the resulting region in @var{address}. -- cgit v1.2.3