From dev-return-2651-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Jun 14 04:26:46 2001 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 13319 invoked by uid 500); 14 Jun 2001 04:26:45 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 13308 invoked from network); 14 Jun 2001 04:26:44 -0000 X-Authentication-Warning: cobra.cs.Virginia.EDU: jcw5q owned process doing -bs Date: Thu, 14 Jun 2001 00:26:49 -0400 (EDT) From: Cliff Woolley X-X-Sender: To: David Reid cc: APR Development List Subject: Re: cvs commit: apr/include apr_sms_blocks.h In-Reply-To: <007901c0f472$24e7bd30$7f00a8c0@VAIO> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Thu, 14 Jun 2001, David Reid wrote: > The bucket structures are done from bms, allocations for data can come from > either ams (some other type of sms yet to be added) or from the pms using > plain old malloc. 8192 gives us space for 127 bucket structures per thread. > If we need more we can always add a method to get more, but given that it'll > only be used for a single thread and be reset between each connection (if > I've got that right) then this should be enough, shouldn't it? One would think, but no, not necessarily. It's possible for a filter to split a brigade up into a million little bitty pieces, possibly even 1 byte per bucket (granted, that'd be a pretty stupid filter). [side note: I just saw Ian's post, and he has some good examples of cases where you could end up with lots of buckets at a time. I'm not sure about the subrequests example, because each subrequest would get handled one at a time, its buckets being dumped out to the network and the buckets freed, generally. But it could happen, I guess.] It occurred to me that all you have to do to handle resets is keep a list of the "extra" blocks you allocate and then loop through them, freeing each one, when the reset happens. You end up with just the one pre-allocated block you started with. > Anyway, grist for the mill to discuss on Friday :) Definitely. =-) --Cliff