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  <20112012  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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: where to free memory in asub record?
From: Andrew Johnson <[email protected]>
To: [email protected], [email protected]
Date: Tue, 15 Mar 2011 14:18:33 -0600
Hi Geyang,

On Sunday 13 March 2011 12:32:24 Silver wrote:
>   I use malloc to get a two dimension array in asub's myAsubInit function.
> but where to free it?  Can anyone give me some instructions? thanks for
> your help.

You don't need to free your memory at all, assuming that your code needs it 
for as long as the IOC is running.  We don't have a mechanism in the IOC to 
delete records at run-time, so your asub record lifetime is the same as the 
IOC's lifetime.  The memory you allocated will get cleaned up automatically by 
the operating system when the IOC process exits on a workstation OS, or by 
vxWorks when the processor reboots.

- Andrew
-- 
An error is only a mistake if you don't learn from it.
When you learn something from it, it becomes a lesson.


References:
where to free memory in asub record? Silver

Navigate by Date:
Prev: RE: Message logging survey Elliott Wolin
Next: Re: class library header file naming and install conventions Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: where to free memory in asub record? Silver
Next: How to use asyn with linux-GPIB Feng Laurence
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·