Re: vmmap
Re: vmmap
- Subject: Re: vmmap
- From: Stan Sieler <email@hidden>
- Date: Fri, 23 Mar 2012 15:32:24 -0700
Re: madvise (thanks to James and Jonas!) ... I'll check into that!
From the name, I suspected that it might not quite meet some needs
I've had in the past (and the man page confirms it).
I've worked on high-end sorting code that does things like:
prefetch (a virtual address, &request_id, NOWAIT)
(similar to madvise (..., MADV_WILLNEED), but stronger)
(If I wanted to wait for the data to be brought in, I'd
pass WAIT instead of NOWAIT ... a prefetch with WAIT is
presumably a bit faster/cheaper than getting a page fault
on the data.)
... code to do other stuff with other data ...
// see if the prefetch is done yet...
if (is_prefetch_request_done (request_id, NOWAIT))
... do something with that data
else
... do stuff with other data already in memory
I.e., I don't just want to say "hey, I plan to use it" ... I want to say
"absolutely start reading it in now, but don't block my code while you do it".
Still, a good reference, thanks!
Stan
_______________________________________________
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
References: | |
| >Re: vmmap (From: James C <email@hidden>) |