FYI - mo' work on std.allocator

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon May 5 07:59:14 PDT 2014


On 5/5/14, 12:13 AM, safety0ff wrote:
> On Monday, 28 April 2014 at 16:03:33 UTC, Andrei Alexandrescu wrote:
>>
>> Fair enough, I'll remove that part of the spec. Thanks! -- Andrei
>
> According to the docs, the "multiple of sizeof(void*)" restriction only
> applies to posix_memalign (and not to _aligned_malloc and aligned_alloc.)

Well I've changed the docs recently, so if they're good now, excellent.

>> I've decided that runtime-chosen page sizes are too much of a
>> complication for the benefits.
>
> Do the complications arise in the MmapAllocator or the higher level
> allocators?

The latter, which make compile-time decisions based on alignment.

> I'd like to see a Windows allocator based on VirtualAlloc, and
> afterwards a "SystemAllocator" defined to be MmapAllocator on unix-based
> and VirtualAlloc based on Windows.
> This "SystemAllocator" would ideally have an allocationGranularity
> property.

Properties that don't need to propagate are easier to accommodate.


Andrei



More information about the Digitalmars-d mailing list