Date: Wed, 14 Jun 2006 14:04:08 +0200 From: Bruno Haible <bruno@clisp.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Vasil Dimov <vd@freebsd.org>, hackers@freebsd.org Subject: Re: valid VMA ranges and mincore() Message-ID: <200606141404.08811.bruno@clisp.org> In-Reply-To: <20060614103420.GA86300@deviant.kiev.zoral.com.ua> References: <200606101822.46437.bruno@clisp.org> <20060614103420.GA86300@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Konstantin, Thanks for reacting on this issue. > Please, evaluate the patch. If it does what you need - It doesn't change the manual page mincore.2. - For unmapped areas, it appears to be filling in values of -1 into the array. This is not what Linux, Solaris, NetBSD do: They return -1 from the system call and set errno to ENOMEM. See Linux: http://linux.about.com/library/cmd/blcmdl2_mincore.htm Solaris: http://docs.sun.com/app/docs/doc/816-5167/6mbb2jaib?a=view NetBSD: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/mincore.2?rev=1.19&content-type=text/plain - Filling in values of -1 into the array will confuse existing applications, because -1 is all bits set, i.e. the nonexistent pages will appear to be in-core, modified, referenced. - Filling in values of -1 into the array could be done more easily by changing the statements in sys/vm/vm_mmap.c lines 861 and 902. Thanks. Bruno
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606141404.08811.bruno>