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: Phil Atkin <[email protected]>
To: [email protected], [email protected], [email protected], [email protected]
Date: Wed, 3 Aug 2016 10:09:45 +0100

Thanks Ulrik,

I'm not sure how much time I'm going to be able to spend on this, and I'm not so familiar with Git that this would be straightforward in any case.

I'm probably going to take a conservative approach to this and accept some limitations in the way my IOC behaves.

Thanks to everyone for their suggestions.  Cheers,

Phil


On 02/08/2016 10:09, [email protected] wrote:
Hi,

This rings a bell. A while ago I started to do something like this. My idea was to better support cameras/drivers that want to manage the image memory (and avoid superfluous copies). A callback can be registered and you can decide whether to re-use or free the memory. It does not address the issue of some plugins holding on (forever?) to their latest received image - but I think that's a bit of a naughty behaviour...

The commits are rather old and would need to be rebased on top of the latest ADCore master branch...

https://github.com/ulrikpedersen/ADCore/commit/3e2910680b5d65ffb881304cff49cf568f13e80c and https://github.com/ulrikpedersen/ADCore/commit/db7199a110d203c7712b66ac925145ffb54b5966 

Cheers,
Ulrik

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Rivers
Sent: 29 July 2016 17:39
To: 'Michael Davidsaver'; [email protected]; 'Phil Atkin'
Subject: RE: NDArrayPool::alloc failing

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.




--
Pixel Analytics is a limited company registered in England. Company number: 7747526; Registered office: 93A New Road, Haslingfield, Cambridge CB23 1LP

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
RE: NDArrayPool::alloc failing Mark Rivers
RE: NDArrayPool::alloc failing ulrik.pedersen

Navigate by Date:
Prev: RE: shell command in medm Li, Yuelin
Next: European Spallation Source - Software Engineer with EPICS Sasu Roxana
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 ulrik.pedersen
Next: shell command in medm Li, Yuelin
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, 03 Aug 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·