From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8ab6ed0f71c479cd X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!news.k-dsl.de!aioe.org!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: API design problem - buffer scatter I/O Date: Mon, 24 Nov 2008 18:16:26 +0100 (CET) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: AxZNCoKKMuaRAaNPzqFEIQ.user.aioe.org X-Complaints-To: abuse@aioe.org NNTP-Posting-Date: Mon, 24 Nov 2008 17:16:26 +0000 (UTC) X-Notice: Filtered by postfilter v. 0.7.5 X-Newsreader: Tom's custom newsreader Xref: g2news2.google.com comp.lang.ada:3743 Date: 2008-11-24T18:16:26+01:00 List-Id: > The problem is that this is a single, continuous array. > How would you approach the design of API for multi-buffer I/O? Multi- > buffer means that the user can provide many arrays, probably of > different sizes, and the library will fill them from first to last. Is this an actual problem? In most systems copying the bytes from an IO buffer into different places will be a small percentage of the time taken by the actual IO, so the simplicity of a single IO buffer is worth the modest cost.