This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Deallocation problem in fortran
- From: erik dot edelmann at iki dot fi
- To: bala22 <abarun22 at gmail dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Sat, 18 Nov 2006 17:47:15 +0200
- Subject: Re: Deallocation problem in fortran
- References: <7418837.post@talk.nabble.com>
On Sat, Nov 18, 2006 at 06:08:56AM -0800, bala22 wrote:
>
> Hi
> I am facing a strange problem with the deallocation if a pointer which is
> allocated through malloc 'C' function. The pointer is quiet big say 29 MB
> and while deallocation (through free 'C' function) it gives me segmentation
> fault in Linux 64b platform Debug version. Release version works fine. I
> thought the problem could be due to the illegal usage of memory during its
> course of computation and hence it could not be able to free the same. So i
> tried to free it immediately after its allocation, but still the problem
> exists. I would be pretty happy to receive inputs in this regard.
Could you show us the actual code that fails, rather than just a
description of it? An as short as possible, but still complete (i.e.
compilable) code example. The problem with a description of the code is that it
very easily happens that you forget to mention something (e.g.
because you think it's irrelevent) that happens to be very important.
And perhaps you also could tell us the exact version (the output of the
command 'gfortran --version'). "Debug version" doesn't tell me very much --
I can imagine several different things that could be called a "debug
version" vs "release version".
Erik