comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Emulating placement new
Date: Sun, 29 Jul 2012 15:14:57 -0400
Date: 2012-07-29T15:14:57-04:00	[thread overview]
Message-ID: <wcca9yicrbi.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 871uju5rq6.fsf@mid.deneb.enyo.de

Florian Weimer <fw@deneb.enyo.de> writes:

> Interesting.  But think this goes into the wrong direction.  The owner
> pool still controls the allocation, Allocate_From_Subpool dispatches
> on the master pool, not the subpool.

I don't see the problem.  The allocator specifies the subpool, and
Allocate_From_Subpool takes the subpool as a parameter.  It could
dispatch on some operation of the subpool, if you want, but for
placement new, you don't even need that -- you just need the
address to allocate at.

>...So I'd still need a special
> access type type inject the owner pool.

I'm not sure what you mean.  You have to attach the "master pool"
to each access type that you want to work this way.  Is that
what you mean?

You don't need a new access type for each allocation address.
That wouldn't work anyway due to accessibility rules, which
is the weakness that subpools are trying to address.

You might also be interested in pragma Default_Storage_Pool,
which can be used to specify the pool for all access types in a
given subsystem, or (with "null") can be used to make sure
you don't forget to specify pools explicitly.

- Bob



      reply	other threads:[~2012-08-06 14:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29 13:56 Emulating placement new Florian Weimer
2012-07-29 14:10 ` Dmitry A. Kazakov
2012-07-29 14:15   ` Florian Weimer
2012-07-29 14:25     ` Dmitry A. Kazakov
2012-07-29 15:00 ` Georg Bauhaus
2012-07-29 16:04 ` Robert A Duff
2012-07-29 18:48   ` Florian Weimer
2012-07-29 19:14     ` Robert A Duff [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