From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6b353437b73507a5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews2.google.com!not-for-mail From: jimmaureenrogers@worldnet.att.net (Jim Rogers) Newsgroups: comp.lang.ada Subject: Re: Basic program with tasks goes out of memory Date: 5 Aug 2004 11:32:39 -0700 Organization: http://groups.google.com Message-ID: <82347202.0408051032.304d30a5@posting.google.com> References: <5ad0dd8a.0408050655.355fa926@posting.google.com> NNTP-Posting-Host: 209.194.156.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1091730759 28405 127.0.0.1 (5 Aug 2004 18:32:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 5 Aug 2004 18:32:39 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:2587 Date: 2004-08-05T11:32:39-07:00 List-Id: wojtek@power.com.pl (Wojtek Narczynski) wrote in message news:<5ad0dd8a.0408050655.355fa926@posting.google.com>... > Hello, > > Any idea why this program (extracted from AdaSockets example) > eventually eats up all RAM? Runtime leak or my ignorance? You are dynamically allocating tasks and never deallocating them. You will always run out of memory if you use dynamic allocation without deallocation. Apparently you are under the impression that the memory for a terminated task is automatically recovered to the heap. This impression is incorrect. Your program demonstrates the problem. You should use Unchecked_Deallocation to recover the dynamically allocated memory from terminated tasks. Jim Rogers