[libcxx] Patch/RFC: Avoid using ::operator new in the default allocator

Chandler Carruth chandlerc at google.com
Wed Sep 25 13:33:47 PDT 2013


On Wed, Sep 25, 2013 at 3:29 PM, Howard Hinnant <howard.hinnant at gmail.com>wrote:

> 20.8.9.1 [allocator.members]/p6:
>
> > Remark: the storage is obtained by calling ::operator new(std::size_t)
> (18.6.1), but it is unspec- ified when or how often this function is
> called. The use of hint is unspecified, but intended as an aid to locality
> if an implementation so desires.
>
> The question becomes, if we make this substitution, is there a test the
> user can write to observe it?  Is there an LWG issue here?
>

I *believe* that by writing a new expression, you get *precisely* this
behavior: storage is obtained by calling ::operator new, but when or how
often can change via the implementation (N3664).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130925/6b0d43b8/attachment.html>


More information about the cfe-commits mailing list