comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Emulating placement new
Date: Sun, 29 Jul 2012 20:48:01 +0200
Date: 2012-07-29T20:48:01+02:00	[thread overview]
Message-ID: <871uju5rq6.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: wcc6296h7ua.fsf@shell01.TheWorld.com

* Robert A. Duff:

> Florian Weimer <fw@deneb.enyo.de> writes:
>
>> Is there a way to specify a storage pool (or something similar) on the
>> allocator, and not on the access type?
>
> Ada 2012 has such a feature.  Instead of:
>
>     X := new T'(This => 123, That => 456);
>
> which allocates in T's storage pool, you can say:
>
>     X := new (My_Pool) T'(This => 123, That => 456);
>
> which allocates in My_Pool.

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.  So I'd still need a special
access type type inject the owner pool.



  reply	other threads:[~2012-08-06 14:22 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 [this message]
2012-07-29 19:14     ` Robert A Duff
replies disabled

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