Re: Ascertaining dirty pages
Re: Ascertaining dirty pages
- Subject: Re: Ascertaining dirty pages
- From: Quinn <email@hidden>
- Date: Mon, 18 Feb 2008 18:02:24 +0000
Please don't cross post to two large lists. Some folks, like me, are
on one list but not on the other, and have no way of knowing whether
your question has already been answered on the other list.
At 13:43 +0200 18/2/08, Vincent Coetzee wrote:
I have a requirement to know which memory pages (allocated by my
application) have been written to during the execution of my
application, I also need to know the addresses of the areas of the
pages that have been changed.
You should be able to solve part of this problem using
<x-man-page://2/mincore>. For any given page, this routine returns a
set of flags that tell you the VM status of the page. Look for the
flags starting with MINCORE_INCORE in <sys/mman.h>.
btw The man page hasn't been updated to reflect the latest semantics
of this routine. It still talks about about returning 1 (meaning in
memory) and 0 (meaning not). That's just a bug in the man page
<rdar://problem/5749556>. AFAIK no version of Mac OS X shipped with
the old semantics.
As to determining which areas of the pages have been changed, I can't
think of any good solution to that problem.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden