Stas Bekman <[EMAIL PROTECTED]> writes: [...]
> that's already scheduled for 2.0 release: > todo/release: > > * consider changing the allocation method in APR::Bucket::new from > malloc/free to bucket_alloc, like all other buckets do > > If you can work on that, it'd be a great help, Joe. I'm happy to scratch that itch, since it's been itching me for a while now. [...] > > The real question, I think, is whether > > or not we should add an apr_bucket_alloc_t * argument to > > modperl_bucket_sv_create(), (so then APR::Bucket::new would > > expect another bucket allocator argument), or stick to malloc/free. > > Well, if we didn't try to avoid the string copying, we could have just > dropped modperl buckets altogether and just use plain string > buckets. But it's not a good idea. > > So hard is it going to be to stick with malloc/free vs. using the > bucket_alloc. Or is there are a good reason against using malloc/free? I don't see the relationship. I think it's a good idea to drop malloc/free because apr_bucket_alloc will outperform it, and we can safely reuse more of the existing apr_bucket_* code in modperl_bucket.c We don't have to throw out svbuckets altogether, we'd just need to change the Perl calling pattern from my $bucket = APR::Bucket->new($data); to my $bucket = APR::Bucket->new($data, $bb->bucket_alloc); -- Joe Schaefer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
