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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!goblin1!goblin.stu.neva.ru!newsfeed.pionier.net.pl!pwr.wroc.pl!news.wcss.wroc.pl!not-for-mail From: antispam@math.uni.wroc.pl Newsgroups: comp.lang.ada Subject: Re: Intervention needed? Date: Mon, 11 Mar 2019 14:31:46 +0000 (UTC) Organization: Politechnika Wroclawska Message-ID: References: NNTP-Posting-Host: hera.math.uni.wroc.pl X-Trace: z-news.wcss.wroc.pl 1552314706 17901 156.17.86.1 (11 Mar 2019 14:31:46 GMT) X-Complaints-To: abuse@news.pwr.wroc.pl NNTP-Posting-Date: Mon, 11 Mar 2019 14:31:46 +0000 (UTC) Cancel-Lock: sha1:LkLaSRqhECz9jvXvdcOGfl1ZeCU= User-Agent: tin/2.4.1-20161224 ("Daill") (UNIX) (Linux/4.19.0 (x86_64)) Xref: reader01.eternal-september.org comp.lang.ada:55831 Date: 2019-03-11T14:31:46+00:00 List-Id: gautier_niouzes@hotmail.com wrote: > You could mention that you can can have dynamically sized variables or objects on the stack, thanks to unconstrained types. No pointers at all, no heap allocation. > > For complex cases like trees, linked lists, etc. you can use the Ada.Containers which have deterministic (then predictable) garbage collection via finalization. Major issue with dynamically sized variables is running out of memory. How do you solve this? Note that in modern environment stacks tend to be tiny compared to heap, so this problem is much more serious when using stack allocation. -- Waldek Hebisch