Date: Fri, 24 Jan 2003 21:51:04 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-Id: <4331-Fri24Jan2003215104+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: <200301232041.h0NKf3D18684@envy.delorie.com> (message from DJ Delorie on Thu, 23 Jan 2003 15:41:03 -0500) Subject: Re: readv, writev [PATCH] References: <3E2FC531 DOT F37C6D24 AT phekda DOT freeserve DOT co DOT uk> <2427-Thu23Jan2003204136+0200-eliz AT is DOT elta DOT co DOT il> <3E305173 DOT 9E89FA57 AT phekda DOT freeserve DOT co DOT uk> <200301232041 DOT h0NKf3D18684 AT envy DOT delorie DOT com> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Thu, 23 Jan 2003 15:41:03 -0500 > From: DJ Delorie > > Note that we already break read() and write() (or is it _read() and > _write()?) into multiple chunks just to get it over to the DOS > buffers. Whatever we do for those should be fine for readv() and > writev(), I see no reason to merge that data into a single buffer. I agree. Also, this reminds me how `write' was also using malloc in its first version, which caused a terrible and hard-to-debug bug in Emacs, since Emacs doesn't expect system calls to call malloc. (Emacs replaces the system malloc with its own allocator which can relocate buffers when it runs out of the available heap, to minimize the number of sbrk calls.) One more reason not to like the malloc'ed hold-it-all buffer approach.