cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <g-froehl...@gmx.de>
Subject AW: [C2 diff] mru store gc logging
Date Fri, 24 Aug 2001 17:14:11 GMT
ok,
1. alghorithm now:
amount of memory used is greater then heapsize
run finalization of objects
run the garbage collector
while free memory is lower then the freememory constant
  free the cache

2. your proposal:
amount of memory used is greater then heapsize
while free memory is lower then the freememory constant
  free the cache
run finalization of objects
run the garbage collector

The 1. approach first gc() the already dereferenced objects.
This has the effect, that the Runtime.freeMemory() value is low
and the loop don't executes so often.

The 2. approach does first loop the cache with a greater
Runtime.freeMemory() value and the runs the gc(). The Loop
would take longer. This method is synchronized and I think
that can be a performance issue then.

That are my thoughts. I prefer the 1. approach.

Cheers
Gerhard
>-----Ursprungliche Nachricht-----
>Von: Marcus Crafter [mailto:crafterm@fztig938.bank.dresdner.net]
>Gesendet: Friday, August 24, 2001 5:01 PM
>An: cocoon-dev@xml.apache.org
>Betreff: RE: [C2 diff] mru store gc logging
>
>
>Hi Vadim,
>
>On Thu, 23 Aug 2001, Vadim Gritsenko wrote:
>
>> BTW, what do you think about while() loop just below debug() statement?
>> It looks to me then when this situation arises there are chances 
>that storage 
>> whould be empty before GC would be kicked again...
>
>	Seems to me like the while loop should be done before garbage
>	collection, as the loop just frees up memory, which will need to be
>	gc'd anyway. (What do you think Gerhard ?)
>
>	Cheers,
>
>	Marcus
>
>-- 
>        .....
>     ,,$$$$$$$$$,      Marcus Crafter
>    ;$'      '$$$$:    Computer Systems Engineer
>    $:         $$$$:   Open Software Associates GmbH
>     $       o_)$$$:   82-84 Mainzer Landstrasse
>     ;$,    _/\ &&:'   60327 Frankfurt Germany
>       '     /( &&&
>           \_&&&&'     Email : Marcus.Crafter@osa.de
>          &&&&.        Business Hours : +49 69 9757 200
>    &&&&&&&:
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>For additional commands, email: cocoon-dev-help@xml.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message