> John Wehle wrote:
> 
> > I started to code this last night using mincore to check each page
> > in the target region one at a time (which should be somewhat portable),
> 
> I don't think mincore is appropriate, as we must check whether there *is*
> a mapping, not just whether some of its pages are actually present in
> physical memory.

Sure it is.  The question is did mincore return an *error* for the page
being checked (in which case nothing is mapped there) or did it return
zero (in which case something is mapped there).  As you mentioned, it
doesn't matter what is returned in vec.  Using mincore should be somewhat
more portable than digging around /proc.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: [EMAIL PROTECTED]  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


Reply via email to