Re: Anyone knowlegable about valgrind ? Was: Re: g77 and valgrind error?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bvds@xxxxxxxxxxxxxxx wrote:

I do not know anything about valgrind, but the Fortran code is perfectly OK. It uses an automatic array x in subroutine fsub that is dimensioned using the dummy argument i, which is an extension of Fortran 77, but allowed in Fortran 90 and supported by g77.

Yes, the code itself is OK... Another detail that I forgot to mention is that the valgrind error goes away when i=350. Is there anything about memory allocation in g77 that would change with increasing i?

I have also put this question to the valgrind people, but
*they* probably don't know much about g77.

I wouldn't know why 360 is a "magic number", but g77 doesn't do anything but place the automatic array on the stack. Therefore, we have to deal with 16 * 360 * 360 bytes = slightly over 2 megabytes of stack space.


I can't see why this would be a problem (unless other automatic arrays are also dimensioned using `i'.

Cheers,

--
Toon Moene - mailto:toon@xxxxxxxxxxxxxxxxxxxx - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux