There's more than one way to do things | |
PerlMonks |
Re^2: [OT] Swapping buffers in place.by BrowserUk (Patriarch) |
on Mar 01, 2015 at 10:53 UTC ( [id://1118255]=note: print w/replies, xml ) | Need Help?? |
No. This is to deal with the edge case where the last buffer is partial. Think:end-of-file. "swapping pointers" would not achieve the same result. After the swap, the left (full-sized) buffer will contain the contents of the right buffer, made up the full buffer size, with the left-hand end of the left buffer. And the right buffer contains the right-hand end the left buffer. The buffers are mem-mapped chunks of a disk file. You can't swap chunks of disk around by swapping pointers. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
In Section
Seekers of Perl Wisdom
|
|