Hi:
Matej might have already explained this elsewhere, but
I didn't "get it" from the JCA notes.
JCA 2.3.1 as well as the latest 2.3.2 have a memory
leak when used with EPICS base _older_than_ R3.14.9
because JCA must call the JNI AttachCurrentThreadAsDaemon()
in CA callbacks but EPICS base _before_ R3.14.9 didn't allow
JCA to detach later.
With R3.14.9/10, epicsAtThreadExit() allows JCA to detach,
but it added a small mem leak in src/libCom/misc/epicsExit.c
that's now fixed in R3.14.11:
static void destroyExitPvt ( exitPvt * pep )
{
ellFree ( &pep->list );
// Fix:
free (pep);
}
To my astonishment, test code that connects, subscribes, then unsubscribes
and disconnects PVs in a loop still showed memory leaks under "valgrind"
on Linux, pointing to memory allocated by the JVM's
AttachCurrentThreadAsDaemon which supposedly should be free'd by
JCA now calling DetachCurrentThread via epicsAtThreadExit.
Turns out that problem is fixed by changing from JSK 1.5.0_09 to
a newer one (tried 1.5.0_17 and 1.6.0_13).
Isn't it great that it's Friday?
-Kay
- References:
- EPICS at exit memory leak Kasemir, Kay
- Navigate by Date:
- Prev:
Re: ai record with dtyp of "raw soft channel" Ralph Lange
- Next:
Motor Soft Record Client Interface Richard Pastrick
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS at exit memory leak Andrew Johnson
- Next:
dbLoadTemplate and includes Emmanuel Mayssat
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|