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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Camonitor with client dictated update rate |
From: | "Johnson, Andrew N. via Tech-talk" <[email protected]> |
To: | Hinko Kocevar <[email protected]>, Emanuele Laface <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Fri, 28 Jun 2019 20:05:40 +0000 |
Hi Hinko, There is a memory leak in the version of the decimation filter I sent out, due to my not completely understanding the filter API (and to a similar bug in the sync filter). An IOC that runs this filter much may eventually run out of memory. Please apply this change to my original code to fix the problem: diff --git a/src/std/filters/decimate.c b/src/std/filters/decimate.c index d34884e..502422f 100644 --- a/src/std/filters/decimate.c +++ b/src/std/filters/decimate.c @@ -63,6 +63,8 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) { if (i++ == 0) passfl = pfl; + else + db_delete_field_log(pfl); if (i >= my->n) i = 0; - Andrew On 6/10/19 10:46 AM, Andrew Johnson wrote:
On 6/10/19 8:34 AM, Hinko Kocevar wrote: -- Complexity comes for free, Simplicity you have to work for. |