This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fopen/fcose: Memory allocation


Hallo,

I've found a strange thing working with the cygnus gcc-compiler
(Cygwin32 Beta 19) for NT.
The gcc-compiler allocates memory during the fopen-fclose-process.
Unfortunately the compiler does not free all memory after closing a
file. This is a problem when handling files successively.
Is there a bug in my test-program or is this a problem as a matter of
principle?

int main()
{
   int i ;
   FILE *in;

   for (i=0;i<1000;i++)
   {
     in = fopen("Test.dat", "w");
     printf(" %d \n",fclose(in));
   }
   return 1;
}

Thank you for all tipps.

Angela Hinterding

--
Dipl.-Math. A. Hinterding
Institut fuer Geoinformatik (IFGI)
der Universität Münster
Robert-Koch-Str. 26-28
D-48149 Muenster
Tel.: 0251/8331965

e-mail: hinterd@ifgi.uni-muenster.de



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]