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!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Tue, 07 Jul 2015 08:23:25 +0000 From: Matthias-Christian Ott User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Dynamic allocation in the predefined language environment References: <559a623d$0$293$14726298@news.sunsite.dk> <1m8r6qty3qecf.1l9e7pzo3lg8p.dlg@40tude.net> In-Reply-To: <1m8r6qty3qecf.1l9e7pzo3lg8p.dlg@40tude.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Message-ID: <559b8bec$0$294$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 149.222.160.172 X-Trace: news.sunsite.dk DXC=_5?;OGjK5M:H=^0YSB=nbEKnk;90;g6;TCVa4?QBB4OQc1?>9S2C>Lo?V]?l=nAi?5m[B3WK_lKf?JX?0 X-Complaints-To: staff@sunsite.dk Xref: news.eternal-september.org comp.lang.ada:26674 Date: 2015-07-07T08:23:25+00:00 List-Id: On 07/07/15 07:42, Dmitry A. Kazakov wrote: > On Mon, 06 Jul 2015 11:13:17 +0000, Matthias-Christian Ott wrote: > >> I need to store strings of unknown length. For security reasons I set >> limits for the types of strings the software handles and I used >> bounded-length strings to store them. > > Why don't you use plain strings allocated in an arena pool? Usually this > covers most of cases where you need controlled allocation of constant and > semi-constant strings. I could this, but then I would have to implement reference counting as well or do manual memory management with all its disadvantages. - Matthias-Christian