Reimplementing software building blocks like malloc and free in D

Aruna Maurya aruna.maurya12 at gmail.com
Sun Aug 12 11:23:55 UTC 2018


On Sunday, 12 August 2018 at 08:34:46 UTC, Mike Franklin wrote:
> On Sunday, 12 August 2018 at 07:00:30 UTC, Eugene Wissner wrote:
>
>> [...]
>
> Inline ASM is a feature of D, so "idiomatic D" includes 
> assembly implementations.  Where D shines here is with it's 
> metaprogramming capabilities and the ability to select an 
> implementation at compile-time or compose implementations.  See 
> https://github.com/JinShil/memcpyD/blob/master/memcpyd.d  There 
> you will that the compiler selects an implementation based on 
> size in powers of 2.  Sizes that aren't powers of 2 can be 
> composed of the powers of 2 implementations.  For example a 6 
> byte implementation would be comprised of a 4-byte 
> implementation plus a the 2 byte implementation.
>
> [...]

So I'll be taking Eugene's code as reference to try and implement 
malloc free and realloc in dlang.


More information about the Digitalmars-d mailing list