Re: Stack corruption and memory leak problems in c++/Fortran application
- From: Anndy <see.nits@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 16:26:43 -0000
On Oct 31, 7:47 pm, Anndy <see.n...@xxxxxxxxx> wrote:
On Oct 31, 7:12 pm, Louis Krupp <lkr...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Anndy wrote:
<snip>
for more clarity i am attaching signature of fortran subroutine and
calling of it from C++.
C++ calling fortran Subroutine :
========================================================================
Fortran Subroutine :
subroutine func(mcode,nbtarb,nufen,nuws,error)
character*(*) mcode
integer error,nufen,nuws,nbtarb
Calling From C++ :
void SomeFunc(void){
int type_obj = 1, ibid = 0, nuws = 1, nufen = 1, ierr = 0;
char code_menu[] = {"ANNDY"};
FUNC(code_menu, &ibid, &nufen, &nuws, &ierr, strlen(code_menu));
}
=============================================================================
How is FUNC declared?
Louis
declaration of FUNC is : void FUNC(char *menu,MY_INT *ibid,MY_INT
*nufen,MY_INT *nuws,MY_INT *ierr, size_t length);
as you pointed out this may be is one of the source for problem. i'll
check this and get back to you guys.
Anndy
there is one more interesting thing what i have noticed. if I put a
WRITE statement in
fortran subroutine, it will take some memory for it.
is this memory is also going on stack?
Anndy
.
- Follow-Ups:
- Re: Stack corruption and memory leak problems in c++/Fortran application
- From: Steve Lionel
- Re: Stack corruption and memory leak problems in c++/Fortran application
- References:
- Stack corruption and memory leak problems in c++/Fortran application
- From: Anndy
- Re: Stack corruption and memory leak problems in c++/Fortran application
- From: Colin Watters
- Re: Stack corruption and memory leak problems in c++/Fortran application
- From: Anndy
- Re: Stack corruption and memory leak problems in c++/Fortran application
- From: Louis Krupp
- Re: Stack corruption and memory leak problems in c++/Fortran application
- From: Anndy
- Stack corruption and memory leak problems in c++/Fortran application
- Prev by Date: Re: opening char variable data file
- Next by Date: Re: OpenMPI Fortran: 'Error reading module mpi' and unexpected but silent termination
- Previous by thread: Re: Stack corruption and memory leak problems in c++/Fortran application
- Next by thread: Re: Stack corruption and memory leak problems in c++/Fortran application
- Index(es):
Relevant Pages
|