memory leak after calling a fortran function
- From: Devendra <dgatkal@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 06:25:06 -0700
Hi,
Please go through the below code
------------------------------------
#include <stdio.h>
#include <conio.h>
#ifdef __cplusplus
extern "C" {
#endif
void DICO(void);
#ifdef __cplusplus
}
#endif
int main()
{
DICO();
}
--------------------------------
Fortran subroutine:
------------------
subroutine dico()
write (*,*) 'Hello'
end
--------------------------------
Please note that I havn't allocated any memory but still the
following observations found
Debug build memory usage details
2816k before fortran function call
2940k After fortran function call
-----
124k Memory Leak ???
Release build memory usage details
2468k before fortran function call
2588k After fortran function call
-----
120k Memory Leak ???
Some memory constantly gets consumed by the process whenever I call
fortran subroutine.
When I removed the write statement, application is not leaking any
memory. Means .. write statement is giving some problem. But how it
could be ????
Regards,
Devendra
.
- Follow-Ups:
- Re: memory leak after calling a fortran function
- From: Steve Lionel
- Re: memory leak after calling a fortran function
- From: Devendra
- Re: memory leak after calling a fortran function
- Prev by Date: Re: Stack corruption and memory leak problems in c++/Fortran application
- Next by Date: Re: Stack corruption and memory leak problems in c++/Fortran application
- Previous by thread: Adding a column to an existing output file
- Next by thread: Re: memory leak after calling a fortran function
- Index(es):
Relevant Pages
|
|