A few thoughts on std.allocator

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue May 12 08:52:39 PDT 2015


On 5/10/15 8:58 AM, Timon Gehr wrote:
> On 05/10/2015 11:50 AM, Andrei Alexandrescu wrote:
>> In C, C++, and D people have allocated memory for a long time in the
>> following manner:
>> ...
>> Long story short, arrays should sit on a different heap than objects.
>> ...
>
> Unless this has been fixed in the interim, I believe DMD lowers new
> S(args) to [S(args)].ptr for struct S. It should be ensured that the
> global allocator will not be misinformed about the kind of allocation
> that takes place, by removing this lowering.

That has been fixed. The compiler now calls a different runtime hook.

-Steve


More information about the Digitalmars-d mailing list