comp.lang.ada
 help / color / mirror / Atom feed
* Basic program with tasks goes out of memory
@ 2004-08-05 14:55 Wojtek Narczynski
  2004-08-05 15:18 ` Dmitry A. Kazakov
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Wojtek Narczynski @ 2004-08-05 14:55 UTC (permalink / raw)


Hello,

Any idea why this program (extracted from AdaSockets example)
eventually eats up all RAM? Runtime leak or my ignorance?

Linux - GNAT 3.4.2 20040729 (prerelease), 
Windows - GNAT 3.15p.

Regards,
Wojtek


with Ada.Exceptions;   use Ada.Exceptions;
with Ada.Text_IO;      use Ada.Text_IO;

procedure Listener is

   task type Echo is
      entry Start;
   end Echo;

   task body Echo is

   begin
      select
         accept Start do
            null;
         end Start;
      or
         terminate;
      end select;

   exception
      when others =>
         Put_Line ("Strange error");
   end Echo;

   type Echo_Access is access Echo;
   Dummy : Echo_Access;

begin

   loop
      Dummy := new Echo;
      Dummy.Start;
      -- The statement below merely "delays" the problem
      delay 0.001;
   end loop;

end Listener;



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

end of thread, other threads:[~2004-08-07  4:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-05 14:55 Basic program with tasks goes out of memory Wojtek Narczynski
2004-08-05 15:18 ` Dmitry A. Kazakov
2004-08-05 16:13 ` Marc A. Criley
2004-08-06  8:54   ` Jano
2004-08-06  9:53     ` Jean-Pierre Rosen
2004-08-06 11:23       ` Jano
2004-08-06 15:26       ` Wojtek Narczynski
2004-08-06 10:57   ` Wojtek Narczynski
2004-08-05 18:32 ` Jim Rogers
2004-08-07  4:04 ` Dmitriy Anisimkov

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