cvs commit: src/lib/libc/sys mincore.2 src/sys/vm vm_mmap.c

Konstantin Belousov kostikbel at gmail.com
Thu Jun 22 03:16:41 UTC 2006


On Wed, Jun 21, 2006 at 02:36:57PM -0700, John-Mark Gurney wrote:
> John Baldwin wrote this message on Wed, Jun 21, 2006 at 14:13 -0400:
> > On Wednesday 21 June 2006 13:58, John-Mark Gurney wrote:
> > > Alan Cox wrote this message on Wed, Jun 21, 2006 at 12:44 -0500:
> > > > John-Mark Gurney wrote:
> > > > 
> > > > >Konstantin Belousov wrote this message on Wed, Jun 21, 2006 at 12:59 
> > +0000:
> > > > >
> > > > >> Modified files:
> > > > >>   lib/libc/sys         mincore.2 
> > > > >>   sys/vm               vm_mmap.c 
> > > > >> Log:
> > > > >> Make the mincore(2) return ENOMEM when requested range is not fully 
> > > > >> mapped.
> > > > >
> > > > >Is this change to be posix compliant or something?  ENOMEM seems like
> > > > >the wrong error, or are we allocating memory?
> > > > >#define ENOMEM          12              /* Cannot allocate memory */
> > > > >
> > > > >the original EINVAL seems to me the correct one, as is commonly used
> > > > >when the data passed in is incorrect...
> > > >
> > > > I looked at this when the patch was proposed.  ENOMEM is the de facto 
> > > > standard error for this case.  To the best of my knowledge, there is no 
> > > > officially-sanctioned specification for mincore(2).
> > > 
> > > Could you please provide a reference to this de facto standard error
> > > as in other places where ENOMEM is used for such an error?
> > 
> > NetBSD and Linux were the examples given on the thread in hackers at .  Check the 
> > archives.
> 
> Thank you for a useful response...  I'm still catching up on email, and
> haven't even attempted to read -hackers yet after my two week trip...
> (though I'm caught up on cvs-all and -current though)..
> 
> I guess since everyone else is using it, it's ok, but I still think it's
> a stupid errno since it has nothing to do w/ memory allocation..
Probably.

Alan Cox described everything from the technical point of view.
I could only add that the change was requested by the user exactly
to get behaviuor consistent with other systems, to not special-case
FreeBSD (see GNU? libsigsegv).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20060622/86bd2251/attachment.pgp


More information about the cvs-src mailing list