On Jun 12, 2010, at 9:27 AM, Connor Lane Smith <c...@lubutu.com> wrote:
On 12 June 2010 08:00, Kris Maglione <maglion...@gmail.com> wrote:
The read operation can only fetch data the size of
half of the entire addressable memory space of a given machine in
one call
Except it can actually fetch as much data as is addressable in memory
in a single call, if the kernel and library are tailored to.
That's why mmap is for. Using read is just stupid.
which has no practical implications whatsoever.
Except efficiency: the fewer system calls required to read the data
the fewer mode switches required, and mode switches are very
expensive.
Not really. Modern CPUs can do the context switching in very few
specific instructions. Which handled by hw, not sw as few years ago.
I find more annoying to have a proces running more time in kernel land
than having to do multiple syscalls.
In fact there's no practical reason to use a read() of 4GB in a shot.
But I'm frankly not interested in fluffy notions about the future,
because
they're irrelevant.
I am interested in the future, for that is where you and I are going
to spend the rest of our lives [1].
[1] http://www.youtube.com/watch?v=xes0F36eTJA
No future. You shouldn't be typing programs that can only run in
hypothetical futurist hardware.
cls