comp.lang.ada
 help / color / mirror / Atom feed
From: Wiktor Moskwa <wiktorDOTmoskwa@gmail.com>
Subject: Re: Workqueues in Ada
Date: Sat, 28 Jul 2007 21:25:18 +0000 (UTC)
Date: 2007-07-28T21:25:18+00:00	[thread overview]
Message-ID: <f8gc7u$kc6$2@nemesis.news.tpi.pl> (raw)
In-Reply-To: m2zm1ggv9l.fsf@mac.com

On 28.07.2007, Simon Wright <simon.j.wright@mac.com> wrote:
> Sounds very complicated & fragile to me, it no longer resembles
> anything one would recognise as a 'queue'.
>

It seems that my 'circular queue' idea was a blind alley.

> It's hard to see how to avoid this with unbounded containers. You
> could look at alternative container packages? (I normally wouldn't
> suggest this, given Ada.Containers, but a BC.Comtainers.Queues.Bounded
> from http://booch95.sf.net doesn't allocate .. but you have to know
> the maximum number of elements you are going to need.)

I think it can be done with unbounded containers provided that
a custom storage pool can be used. The pool would allocate memory
in chunks for i.e. 100 items and thus only 1 call in 100 would
result in malloc call. Deleted items would make place for new ones
and so on.

-- 
Wiktor Moskwa



  reply	other threads:[~2007-07-28 21:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-28 17:00 Workqueues in Ada Wiktor Moskwa
2007-07-28 17:28 ` Dmitry A. Kazakov
2007-07-28 17:52   ` Wiktor Moskwa
2007-07-28 19:53     ` Simon Wright
2007-07-28 21:25       ` Wiktor Moskwa [this message]
2007-07-28 20:45     ` Dmitry A. Kazakov
2007-07-28 21:19       ` Wiktor Moskwa
2007-07-29  8:36         ` Dmitry A. Kazakov
2007-07-29 19:53           ` Wiktor Moskwa
2007-07-30  6:47             ` Niklas Holsti
2007-07-30 15:56               ` Matthew Heaney
2007-07-30 15:53             ` Matthew Heaney
2007-07-30 19:57               ` Wiktor Moskwa
2007-07-30 15:52           ` Matthew Heaney
2007-07-31 20:54             ` Wiktor Moskwa
2007-08-01  8:30               ` Dmitry A. Kazakov
2007-07-28 17:31 ` Jeffrey R. Carter
2007-07-28 17:56   ` Wiktor Moskwa
2007-07-28 20:18   ` Wiktor Moskwa
2007-07-28 20:48     ` Robert A Duff
2007-07-28 21:03       ` Wiktor Moskwa
2007-07-28 21:38         ` Robert A Duff
2007-07-28 22:12           ` Wiktor Moskwa
2007-07-29  0:30             ` Robert A Duff
2007-07-29  6:38               ` Jeffrey R. Carter
2007-07-29  6:34           ` Jeffrey R. Carter
2007-07-29  6:30     ` Jeffrey R. Carter
2007-07-28 21:54 ` Robert A Duff
2007-07-30 15:48 ` Matthew Heaney
replies disabled

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