Perhaps i found the begin of an explanation, in NetBSD and linux , error
codes for mincore() are :  
     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

     [EINVAL]           len is equal to 0.

     [ENOMEM]           The address range specified is invalid for the
calling process, or one or more of the pages specified in the range are not
mapped                 

So I think that when you call mincore for testing if a page is mapped or not
the result would be -1 and errno set to ENOMEM.


But in FreeBSD a man mincore give this errors conditions:

     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

It seems that when a page is not mapped mincore return no error code.


-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part
de Alexandre Julliard
Envoyé : jeudi 28 juillet 2005 11:48
À : jean-marc DETREZ
Cc : wine-devel@winehq.com; [EMAIL PROTECTED]; 'Gerald Pfeifer';
[EMAIL PROTECTED]
Objet : Re: patch for libs/wine/mmap.c making wine running on FreeBSD 5.x

"jean-marc DETREZ" <[EMAIL PROTECTED]> writes:

>   I made a little correction of  "try_mmap_fixed" because it's seems to me
> that the function didn't really test the result (vec).

That's the way it should be, we don't care if the page is in core or
not, we only want to know if something is mapped there.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Reply via email to