Re: 10.6.2 issues with F_NOCACHE?
Re: 10.6.2 issues with F_NOCACHE?
- Subject: Re: 10.6.2 issues with F_NOCACHE?
- From: Michael Smith <email@hidden>
- Date: Thu, 4 Feb 2010 22:19:05 -0800
On Feb 4, 2010, at 2:23 AM, Godfrey van der Linden wrote: Unfortunately the mmap won't really help you as it will map the entire file into memory at some stage.
Yes, but more efficiently than reading the entire file into a malloc block (which is what I inferred the OP is doing; but maybe I'm wrong.)
Actually, no. Reading from an F_NOCACHE file into a properly aligned, allocated block will be significantly more efficient than using mmap.
It also gives you a sensible way to handle I/O errors.
mmap() is largely evil, and should be avoided wherever possible.
= Mike
-- Excellence in any department can be attained only by the labor of a lifetime; it is not to be purchased at a lesser price -- Samuel Johnson
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden