Re: OFFTOPIC: Regarding NT vs Linux

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Tue, 23 Sep 1997 11:49:35 +0200


> On the other hand,
>
> p = mmap (fd, ..., file_size);
> for (i=0;i < file_size;i+= PAGE_SIZE);
> (void) *(volatile char *)p[i]; /* Generate a ref to p[i] */
>
> write (socket, p, file_size);
>
> will first pagefault as fast as possible, allowing the drive to get
> all pages in one go, and then write the data from memory.

But pagefaults cost something - it's one exception per page, which is
I believe pretty much.
Pavel

-- 
--
This is my little buggy signature...				Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+