This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, fortran] Runtime memory leak checking.
- From: Tobias Burnus <burnus at net-b dot de>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 30 Nov 2008 23:00:34 +0100
- Subject: Re: [Patch, fortran] Runtime memory leak checking.
- References: <email@example.com>
Paul Richard Thomas wrote:
> It also adds hooks for memusage and recursion in runtime.
The following does not work:
It is accepted but does not enable bounds checking.
I think you should also a flag for -fcheck-array-temporaries to
and maybe also "all". What is "memusage" supposed to do?
(I think you plan to add a patch for "memusage" soon; if not I'd prefer
that remove the option.)
@@ -5453,8 +5469,9 @@
TYPE_SIZE_UNIT (gfc_get_element_type (type))));
/* Allocate memory to the destination. */
- tmp = gfc_call_malloc (&block, TREE_TYPE (gfc_conv_descriptor_data_get (src)),
+ tmp = gfc_allocate_with_status (&block, size, NULL_TREE,
+ tmp = fold_convert (TREE_TYPE (gfc_conv_descriptor_data_get (src)), tmp);
gfc_conv_descriptor_data_set (&block, dest, tmp);
Is there a reason that you don't use
if (gfc_option.rtcheck & GFC_RTCHECK_MEMLEAKS)
here, but that you have such an if in lines
@@ -4179,7 +4186,12 @@
You need to update invoke.texi. Additionally, you need to add the new
functions to gfortran.map. After doing so, one can actually get rid of
Is it really necessary to link libiberty even if no memleak checks are