From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Emulating placement new
Date: Sun, 29 Jul 2012 12:04:29 -0400
Date: 2012-07-29T12:04:29-04:00 [thread overview]
Message-ID: <wcc6296h7ua.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 87vch67jsk.fsf@mid.deneb.enyo.de
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.
Look up "subpools" in the Ada 2012 RM for details.
For "placement new", you will want to write a pool
that takes an address-to-allocate-at as a discriminant.
- Bob
next prev parent reply other threads:[~2012-07-29 16:04 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 [this message]
2012-07-29 18:48 ` Florian Weimer
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