public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* allocation of memory
@ 2000-04-26  8:19 Angela Hinterding
  2000-04-26 14:14 ` Martin v. Loewis
  0 siblings, 1 reply; 2+ messages in thread
From: Angela Hinterding @ 2000-04-26  8:19 UTC (permalink / raw)
  To: help-gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: allocation of memory
  2000-04-26  8:19 allocation of memory Angela Hinterding
@ 2000-04-26 14:14 ` Martin v. Loewis
  0 siblings, 0 replies; 2+ messages in thread
From: Martin v. Loewis @ 2000-04-26 14:14 UTC (permalink / raw)
  To: hinterd; +Cc: help-gcc

> 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.

Please note that the gcc compiler does not implement fopen/fclose at
all. Instead, those are provided by the C library, which is not part
of GCC. Instead, the C library you are using is provided by the Cygwin
project at sourceware.cygnus.com. They might give you better help.

Regards,
Martin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-04-26 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-26  8:19 allocation of memory Angela Hinterding
2000-04-26 14:14 ` Martin v. Loewis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).