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  2009  2010  2011  2012  2013  2014  2015  <20162017  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: NDArrayPool::alloc failing
From: Mark Rivers <[email protected]>
To: "'Michael Davidsaver'" <[email protected]>, "[email protected]" <[email protected]>, "'Phil Atkin'" <[email protected]>
Date: Fri, 29 Jul 2016 16:38:53 +0000
Hi Michael,

This is an excellent suggestion.  

Phil, this should solve your problem.  Your driver will get a callback when the array has been released.  You can then do what you want with the buffer pointer, being confident that no plugin is using it.  If you want to implement it in NDArrayPool and NDArray you can then issue a pull request on Github.  

Mark


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Michael Davidsaver
Sent: Friday, July 29, 2016 9:37 AM
To: [email protected]
Subject: Re: NDArrayPool::alloc failing

On 07/29/2016 09:29 AM, Mark Rivers wrote:
> We could add an NDArray::getReferenceCount method.  If you have the array reserved and getReferenceCount=1 then you can be sure all the plugins have released it.

A good interface to handle this sort of situation would be for
NDArrayPool::alloc() to accept a callback function pointer to "cleanup"
the user provided buffer when the NDArray ref. count falls to zero.



Replies:
RE: NDArrayPool::alloc failing ulrik.pedersen
References:
NDArrayPool::alloc failing Phil Atkin
RE: NDArrayPool::alloc failing Mark Rivers
Re: NDArrayPool::alloc failing Phil Atkin
RE: NDArrayPool::alloc failing Mark Rivers
Re: NDArrayPool::alloc failing Michael Davidsaver

Navigate by Date:
Prev: RE: NDArrayPool::alloc failing Mark Rivers
Next: RE: shell command in medm Mooney, Tim M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: NDArrayPool::alloc failing Michael Davidsaver
Next: RE: NDArrayPool::alloc failing ulrik.pedersen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Aug 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·