On May 12, 11:29am, Siamak Kaveh wrote:
> Subject: memory leak
> I have a simple question...(sorry for that)
>
> What does exactly memory leak mean? How can we detect it?
It means you allocate memory and not only fail to deallocate it,
but also lose any means of addressing it. For example, you
ALLOCATE a pointer, then ALLOCATE it again. The memory allocated
in the first ALLOCATE is lost to the program, but still takes
up system resources and is unavailable either for use with its
current contents or to be recycled in a subsequent ALLOCATE.
Detection is, in general, hard. There are tools available on
the market, such as Purify from Rational Software, which work
great for C programs but which are somewhat buggy for F90. Maybe
other tools work better.
-P.
--
*********** How can we have ethnic music without ethnic hatred? ***********
* Peter S. Shenkin; Chemistry, Columbia U.; 3000 Broadway, Mail Code 3153 *
** NY, NY 10027; [log in to unmask]; (212)854-5143; FAX: 678-9039 ***
*MacroModel WWW page: http://www.columbia.edu/cu/chemistry/mmod/mmod.html *
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|