comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Dynamic allocation in the predefined language environment
Date: Tue, 7 Jul 2015 10:46:16 +0200
Date: 2015-07-07T10:46:16+02:00	[thread overview]
Message-ID: <15qzm7ya25iur.127dec8vsiaff.dlg@40tude.net> (raw)
In-Reply-To: 559b8bec$0$294$14726298@news.sunsite.dk

On Tue, 07 Jul 2015 08:23:25 +0000, Matthias-Christian Ott wrote:

> 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.

and advantages. An arena or LIFO pool assumes that you deallocate strings
by groups.

There are very few cases when strings are deallocated at all and even fewer
ones when they are deallocated randomly.

If you indeed have safety concerns, then that must certainly apply to your
case.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

      reply	other threads:[~2015-07-07  8:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 11:13 Dynamic allocation in the predefined language environment Matthias-Christian Ott
2015-07-06 13:04 ` G.B.
2015-07-06 14:21   ` Matthias-Christian Ott
2015-07-06 14:06 ` Bob Duff
2015-07-06 14:16   ` Matthias-Christian Ott
2015-07-06 14:23     ` G.B.
2015-07-06 14:43       ` Matthias-Christian Ott
2015-07-06 14:56         ` Bob Duff
2015-07-07  8:46           ` Matthias-Christian Ott
2015-07-07 22:32             ` Bob Duff
2015-07-08 19:47               ` Randy Brukardt
2015-07-08 21:08                 ` Bob Duff
2015-07-10 21:58                   ` Randy Brukardt
2015-07-08 21:16                 ` Dmitry A. Kazakov
2015-07-06 14:45     ` Bob Duff
2015-07-06 20:28       ` Randy Brukardt
2015-07-07  8:49       ` Matthias-Christian Ott
2015-07-07 22:14         ` Bob Duff
2015-07-06 15:29   ` Simon Wright
2015-07-06 20:31     ` Randy Brukardt
2015-07-06 21:35       ` Simon Wright
2015-07-07 18:29         ` Randy Brukardt
2015-07-06 20:22   ` Randy Brukardt
2015-07-06 18:45 ` Jeffrey R. Carter
2015-07-07  7:42 ` Dmitry A. Kazakov
2015-07-07  8:23   ` Matthias-Christian Ott
2015-07-07  8:46     ` Dmitry A. Kazakov [this message]
replies disabled

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