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: a07f3367d7,c19e8df8a75221d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!e34g2000vbm.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Q: Line_IO Date: Tue, 1 Sep 2009 00:02:58 -0700 (PDT) Organization: http://groups.google.com Message-ID: <56e70160-3e24-4bd0-be49-99999c191522@e34g2000vbm.googlegroups.com> References: <4a9b045a$0$31875$9b4e6d93@newsspool3.arcor-online.net> <1a4usf20z4mxa.1vct95fmrcs6h.dlg@40tude.net> <4a9c6320$0$31347$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1251788578 14332 127.0.0.1 (1 Sep 2009 07:02:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Sep 2009 07:02:58 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e34g2000vbm.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8090 Date: 2009-09-01T00:02:58-07:00 List-Id: Georg Bauhaus wrote on comp.lang.ada: > =A0 =A0BUFSIZ: constant :=3D 8_192; [...] > =A0 =A0SL : constant Natural :=3D Separator_Sequence'Length; > =A0 =A0subtype Extended_Buffer_Index is Positive range 1 .. BUFSIZ + SL; Since BUFSIZ is obviously chosen as an integral number of hardware memory pages, the extended_buffer uses two pages plus two bytes. How about allocating a buffer of BUFSIZ bytes and using only BUFSIZ-SL for the string and the remaining SL bytes for the terminator? I realize that at this point we're down to nitpicking because the program seems really good and fast now. -- Ludovic Brenta.