Hi all,
I have a serious problem with memory. Hope anyone can help me.This is what happens:
In my application, there are many arrays (large arrays,i.e real*4 array(60000,180)). Besides, these arrays are passed as arguments among the diferent subroutines. And what is the worst...these subroutines can be called too many times (80000 - 100000 times aprox).
At the beggining, I used these arrays as static (I had only used Fortran77 until this application). The consequences were that after a time of execution I got stack overflow. Then, using ftn95 advantages, I used allocatable arrays and pointers to pass them as arguments, and deallocate to avoid the overflow. Now I do not have stack overflow.
However, if I use the Window Task Manager(Ctrl+Alt+Spr) and see the performance tab, the memory increases and doesn´t stop. The program works o.K but it seems it doesn´t release memory, and in some cases, if I have large arrays the program 'cracks'. Now I have defined all the variables, arrays as dynamic, but memory still grows. Anyway, and tell me if I am wrong, the local variables are supposed to be released when subroutines end. And when a 'deallocate(array)', the memory is also suposed to be released. In my program, the memory is only released when the program is exited.
If this can help you..I am using .NET platform (a c# program, and I call the fortran routine from c#). Is there garbage collector in FTN95, is my problem diferent. In the other side, I have read the previous thread about editbin, but I am not sure if is the same problem as mine.
Sorry by the large writting but I think it was necessary. It is difficult to explain. Thanks a lot. Regards Roberto