harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib]Using APR for Harmony's native link to the OS
Date Tue, 04 Jul 2006 16:22:56 GMT
Garrett Rooney wrote:
> On 7/4/06, Mladen Turk <mturk@apache.org> wrote:
>> Garrett Rooney wrote:
>> >
>> > Until a version of APR exists that doesn't require the use of memory
>> > pools, this approach is simply not reasonable to take.
>>
>> I pretty much agree with you.
>> The entire tomcat-native that makes a low level network
>> abstraction is very much slowed down by the fact that we
>> need to create the pool for every object either socket
>> or file.
>>
>> The entire problem would disappear if there would
>> be a simple apr_free.
> 
> Unfortunately, it's not really as simple as that.  The underlying APR
> allocators are optimized for quick allocation (a comparison and a
> pointer increment in the common case for non-threaded apps, that plus
> a mutex lock (hopefully noncontested) in threaded, IIRC) at the cost
> of not providing any of the infrastructure that would allow free to
> work.  Adding that sort of support would be very nontrivial.
> 
> Personally, I think a more practical approach is a separate set of
> functions that create APR objects without pools, with pool based
> wrappers built on top of them for use in systems that are built with
> pools in mind.
> 
> Don't get me wrong, I love pools in many situations, but there are a
> huge number of applications that can't use APR today because it
> basically requires you to buy into the pool based approach to resource
> management, which just doesn't fit all programs.
> 
> Anyway, now we're way off topic for this list ;-)

Right, we did have this discussion a while ago and I thought we had
concluded it was not going to be a great idea.

However, I am interested in discussing how we could use the classlib
portlib on APR to bound the VM/classlib resource usage (e.g. using APR
as a 'virtual OS' sandbox) -- perhaps so it will play nicely as an httpd
module for example.  I'll sign-up to the APR dev list...

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message