cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From volker.schm...@basf-it-services.com
Subject Re: Memory leak due to pooling
Date Fri, 09 Jan 2004 12:50:41 GMT
                                                                                          
                                            
                      "Carsten                                                           
                                             
                      Ziegeler"                An:      "Cocoon-Dev" <dev@cocoon.apache.org>
                                          
                      <cziegeler@s-und         Kopie:   (Blindkopie: Volker Schmitt/BASF-AG/BASF)
                                     
                      -n.de>                   Thema:   Memory leak due to pooling    
                                                
                                                                                         
                                             
                      09.01.2004 07:53                                                   
                                             
                      Bitte antworten                                                    
                                             
                      an dev                                                             
                                             
                                                                                         
                                             
                                                                                         
                                             








> The last days showed that we have a lot of potential memory leaks,
> see
>
> [1] http://marc.theaimsgroup.com/?t=107330680600002&r=1&w=2
> and
>
> [2] http://marc.theaimsgroup.com/?t=107355695400003&r=1&w=2
>
> This is caused by the simple fact that in some cases the recycle()
> method of a Recyclable component is not called (see [2] for some
> details about that).

Hm, If I look to the ECM code (ResourceLimitingPool):

/**
 * Returns a poolable to the pool and notifies any thread blocking.
 *
 * @param poolable Poolable to return to the pool.
 */
public void put( Poolable poolable )
{
    // Handle Recyclable objects
    if( poolable instanceof Recyclable )
    {
        ( (Recyclable)poolable ).recycle();
    }
    synchronized( m_semaphore )
    {


it can' t be the case (for ECM) that a component is not recycled, because
calling recycle is done before checking the pool full condition. I agree,
that this is not a defined behavior and can be container dependent.

<snip />




Mime
View raw message