httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: the ap_r* thing (was: Re: Apache 2.0 beta STATUS)
Date Mon, 22 Jan 2001 21:00:47 GMT

> > *) ap_rwrite(my_buffer, 100000, r)
> > 
> >    gstein: flush the existing buffer (in the old_write filter), wrap a
> >            transient bucket around my_buffer, and deliver the brigade
> > 
> >    rbb: crash due to a memory overwrite in apr_brigade_write() -- it would
> >         copy the 100k my_buffer into a 9k malloc buffer.
> > 
> > [ assuming we fix that bug... ]
> > 
> > apr_brigade_write() has nowhere to send the data, so it allocates
> > and copies the 100k into a new HEAP bucket, appends it to the
> > brigade (r->bb), and then returns.
> > 
> > eek! 100k memory copy!

Actually, at this point, we would do zero copies, we would just add a new
bucket and move on.  This feature was added in last night's patch.

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Mime
View raw message