comp.lang.ada
 help / color / mirror / Atom feed
From: Achim Gerhard <achim_g@my-deja.com>
Subject: Re: Create-Delete tmp Files
Date: 2000/03/21
Date: 2000-03-21T00:00:00+00:00	[thread overview]
Message-ID: <8b8195$ahk$1@nnrp1.deja.com> (raw)
In-Reply-To: tqtB4.3191$b64.79684@news.pacbell.net

In article <tqtB4.3191$b64.79684@news.pacbell.net>,
tmoran@bix.com wrote:
> >loop
> >Text_IO.Create ( File => the_file, Mode => Text_IO.OUT_File );
> >Text_IO.Reset ( File => the_file, Mode => Text_IO.IN_File );
> >Text_IO.Delete ( File => the_file );
> >end loop;
> >Why does this code cause the Ada runtime to accumulate memory?
> >For me, at this time, it doesn't matter what compiler and machine.
> For me, using Janus 3.1.1e for Windows NT and using the vendor's
> library Memavail and Maxavail routines, and the Windows 95 System
> Monitor accessory, 10,000 times around the loop shows no memory loss.
> Sounds like an error in your compilers or OSes.
OK.
But it seems to be a common error. You can see this behaviour with
Alsys Ada v5.5.2 and v6.2.1; Solaris 2.5; Sparc
VADSself Ada 6.2; Solaris 2.5; Sparc
Alsys Ada V5.5.8; LynxOS 2.3; x86
ObjectAda 7.1.2; MS-Windows NT; x86
GNAT 3.12p; MS-Windows NT; x86
(all for now)
I wrote 'it doesn't matter what compiler and machine', because my
question was (in 'other' words):
"Should the following work?"
loop
Text_IO.Create ( File => the_file, Mode => Text_IO.OUT_File );
... some statements to write to the_file
...
Text_IO.Reset ( File => the_file, Mode => Text_IO.IN_File );
... some statements to read from the_file
...
Text_IO.Delete ( File => the_file );
-- at this point all stuff concerning the_file has disappeared
-- and the heap (and everything else) looks as if the_file
-- has never been created
end loop;
Something is wrong. Is it my Ada code or is it the Ada runtime?
Regards,
Achim
--
_ _
/A/G


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-03-21  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-17  0:00 Create-Delete tmp Files Achim Gerhard
2000-03-17  0:00 ` Robert Dewar
2000-03-17  0:00 ` John J Cupak Jr
2000-03-18  0:00   ` Robert Dewar
2000-03-20  0:00     ` Achim Gerhard
2000-03-20  0:00       ` Robert A Duff
2000-03-20  0:00         ` Achim Gerhard
2000-03-20  0:00           ` Robert A Duff
2000-03-20  0:00       ` tmoran
2000-03-21  0:00         ` Achim Gerhard [this message]
2000-03-21  0:00           ` Roger Barnett
2000-03-23  0:00             ` Achim Gerhard
2000-03-23  0:00               ` Robert Dewar
2000-03-24  0:00                 ` Achim Gerhard
2000-03-24  0:00                   ` Robert Dewar
2000-03-23  0:00               ` tmoran
2000-03-21  0:00           ` Robert Dewar
2000-03-20  0:00       ` Gautier
2000-03-20  0:00         ` Preben Randhol
2000-03-20  0:00           ` Gautier
2000-03-20  0:00             ` Preben Randhol
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox