zero-copy API
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Oct 14 18:58:03 PDT 2010
On 10/14/2010 07:50 PM, Denis Koroskin wrote:
> On Fri, 15 Oct 2010 03:08:23 +0400, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>
>> http://docs.google.com/viewer?a=v&q=cache:K15RE_6zxSwJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.134.4874%26rep%3Drep1%26type%3Dpdf+zero+copy+i/o&hl=en&gl=us&pid=bl&srcid=ADGEESjBkiUxG4hRImVjOFy886GrJxRuhFcePjbadiUw9h1c_iicbhhArOgd55vpk0tP6ST4KjhY1j6rl1_PN-msIExUvxSPJWuXfQTbljj4ZYyutY6wvp3mc3t2LuA2-5kKPbbEp7z6&sig=AHIEtbSmuH-Y2AGdwSQxyJcbBXLRB3mJdg
>>
>>
>>
>> Andrei
>
> That paper is an ancient one and the API they demonstrated isn't a good
> one.
What is a better, more recent one? I noticed that libfbufs has little
traction (googling for it only reveals 4 results) but the paper is
quoted by 63 others, so it's fairly influential.
> It is a huge step backward for a language with a garbage collector
> to ask users to free buffers manually when they don't need them.
That's a system-level API. It can receive any amount of window dressing.
> You
> can't do it automatically upon next read/write operation because user
> can still have a pointer to it. In general, you can't reuse old buffer
> and it means you must allocate new one every time you issue an I/O
> request, and memory allocation is a more expensive operation than a memcpy.
I think that can be fixed by using sealing.
Andrei
More information about the Digitalmars-d
mailing list