comp.lang.ada
 help / color / mirror / Atom feed
From: wojtek@power.com.pl (Wojtek Narczynski)
Subject: Basic program with tasks goes out of memory
Date: 5 Aug 2004 07:55:27 -0700
Date: 2004-08-05T07:55:27-07:00	[thread overview]
Message-ID: <5ad0dd8a.0408050655.355fa926@posting.google.com> (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;



             reply	other threads:[~2004-08-05 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05 14:55 Wojtek Narczynski [this message]
2004-08-05 15:18 ` Basic program with tasks goes out of memory 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
replies disabled

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