EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: EPICS at exit memory leak
From: "Kasemir, Kay" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 02 Apr 2009 14:31:23 -0400
Hi:

While looking for memory leaks in JCA,
I noticed that simply using R3.14.9/10 fixes part of
the problem because the epicsAtThreadExit() method
in newer EPICS relases is used by JCA to properly detach
CA threads from JNI threads.

But it seems that epicsAtThreadExit actually
adds a new memory leak in src/libCom/misc/epicsExit.c:

static exitPvt * createExitPvt ()
{
    // The exitPvt calloc'ed in here ...
    exitPvt * pep = calloc ( 1, sizeof ( * pep ) );
    if ( pep ) {
        ellInit ( &pep->list );
    }
    return pep;
}

// ... is not free'd in here
static void destroyExitPvt ( exitPvt * pep )
{
    ellFree ( &pep->list );
    // Fix:
    // free (pep)
}


Thanks,
-Kay


Replies:
Re: EPICS at exit memory leak Andrew Johnson
JCA memory leaks w/ older EPICS base or JVM Kasemir, Kay

Navigate by Date:
Prev: devLib Davidsaver, Michael
Next: dbLoadTemplate and includes Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: CLS Openings in the Control and Instrumentation Group Elder Matias
Next: Re: EPICS at exit memory leak Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·