Memory Leak Problem



Hey Guys,

Just to start off, this is my first time on this forum, so I aplogize
in advance.

Before I get into my problem, I'm not a programmer, I'm a stats
masters student and have to write some code to
carry out my research, hence the poor programming structure.

That being said, I have, what I believe to be a memory leak problem. I
think I have located the problem, but Im not sure how to fix it.

I have an iterative process that carries one for about a 1000 times.
And each iteration I generated about 700000 random numbers. I have
used the ALLOCATE() function before the iterative techniques, but when
I have tried using the DEALLOCATE() function I get a segmentation
fault. The variable that contains these random numbers is a pointer,
and I have named it "rout." The random numbers come from a subroutine
too. I have given a link to the code (which is not very long at all),
and if someone has any suggestions I am truly greatful, as this
problem has frustrated me for too long now!

http://www.uoguelph.ca/~bhabibza/epidemic.f <- main code
http://www.uoguelph.ca/~bhabibza/subrng.f <- subroutine to
produce random numbers

Thanks in advance,

Babak
.



Relevant Pages

  • Re: Larkin, Hobbs lets meet in the middle.
    ... But accepting iteration and failure is self-fulfilling. ... care, most hardware can be right the first time, and most software can ... path to bugs, in hardware or software. ... could get it right first time. ...
    (sci.electronics.design)
  • Universal PIC switchmode status report
    ... output voltage setpoint ... I looked and thought: 'Why not use a transformer, 1:1', (and actually the SEPIC design solves ... SO, after reading that remark, went back, soldered it out, put the PIC in the programmer, it already has ... the RS232 interface, programmed it, 100% OK first time, ...
    (sci.electronics.design)
  • Re: MAC_OS_X_VERSION_MAX_ALLOWED?
    ... > Just starting OS X development for the first time. ... I wrote Mac code in ... > I was handed a project started by another programmer that had to bail, ... Biggest gotcha is non-system libraries that you forget to move, ...
    (comp.sys.mac.programmer.help)
  • Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---W
    ... How many times have you gotten it right the first time. ... professional programmer I have yet to get it right the first time. ... But IME the cost of the static typing outweighs that ... dynamically typed language build time is zero. ...
    (comp.object)
  • Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---W
    ... How many times have you gotten it right the first time. ... professional programmer I have yet to get it right the first time. ... But IME the cost of the static typing outweighs that ... dynamically typed language build time is zero. ...
    (comp.programming)