[GSoC] 'Independency of D from the C Standard Library' progress and update thread

Mike Franklin slavo5150 at yahoo.com
Mon Jun 3 23:45:11 UTC 2019


On Sunday, 2 June 2019 at 11:19:20 UTC, Sebastiaan Koppe wrote:

> What I am trying to say is that you can avoid porting the whole 
> thing.

Yes, that is understood.  Only what is required to implement a 
malloc replacement is within the scope of the project.

>> use the `IAllocator` interface.  Therefore, any allocator 
>> conforming to that interface could potentially serve as 
>> druntime's allocator.
>
> I am not a big fan of the IAllocator interface since it 
> introduces a layer of indirection. There is no simple solution 
> to avoid the indirection and get a pluggable allocator. Well, 
> maybe a combination of ldc's @weak and LTO. Dunno...
>
> https://wiki.dlang.org/LDC-specific_language_changes#.40.28ldc.attributes.weak.29
> http://johanengelen.github.io/ldc/2016/11/10/Link-Time-Optimization-LDC.html

The project is pressed for time, so I'd like to stick with 
something known and well-documented.  Perhaps IAllocator is not 
the right solution in the end, but still, implementing it and 
seeing how it fits into druntime should inform future directions, 
and perhaps even elicit some new ideas.

Mike


More information about the Digitalmars-d mailing list