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] Recognizing lock objects
Date Thu, 05 Oct 2006 09:46:40 GMT
Nathan Beyer wrote:
> There may be value in doing this, but what's the increase in class file
> overhead? Every new class that gets created for these locks ends up as
> another class file that has to be stored (takes up drive space) and has to
> be loaded (takes up memory in the class loader). Ever additional class file
> takes up at least 1K of space on Windows.
> 
> How many of these locks are we talking about?

I haven't counted, but I'd guess 10's rather than 100's based on what I
have found so far.

Each .class files created take up about 360 bytes in the JAR file.  The
size in memory is obviously dependent upon the VM implementation but I
don't expect it to be onerous (in the IBM VME it will, by coincidence,
be very roughly the same number of bytes in memory).

Regards,
Tim


>> -----Original Message-----
>> From: Tim Ellison [mailto:t.p.ellison@gmail.com]
>> Sent: Wednesday, October 04, 2006 6:30 AM
>> To: harmony-dev@incubator.apache.org
>> Subject: Re: [classlib] Recognizing lock objects
>>
>> Mikhail Fursov wrote:
>>> Another variant is to use anonymous class without the name:
>>>    Object lock = new Object(){};
>>>
>>> But the name by itself (RepositionLock) serves like a comment.
>> Yep -- I'm inclined to keep the meaningful name.
>>
>> Reagrds,
>> Tim
>>
>>
>>> On 10/3/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
>>>>     private class RepositionLock {}
>>>>     private Object repositionLock = new RepositionLock();
>>>>
>>>>
>>>
>> --
>>
>> 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
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 

-- 

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