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
<2011>
2012
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
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|